Resources

People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!

NotLegit: Azure App Service vulnerability exposed hundreds of source code repositories- 712

Shir Tamari - Wiz.ioPosted 4 Years Ago
  • Azure App Service is a cloud computing platform for hosting websites and web applications. The service is meant to be super easy to use to deploy code quickly. The code can be pulled via SSH, Github or other places.
  • A classic website configuration problem is exposing the sensitive files on the server by accidentally exposing them in the web root of the server. Included in this category of sensitive files is the .git folder.
  • .git holds all of the information about a git repository from the first commit to the most recent. By getting access to this directory, it is possible to recover the entire source code from the application!
  • Source code may have hardcoded passwords, important intellectual property and many other sensitive pieces of information. Being able to steal the source code is a terrible vulnerability.
  • The solution that Azure App Services implemented for this was to add information to the web.config. Since web.config is only C# specific, this mitigation only worked on C# applications. As a result, deployments for PHP, Ruby, Python and Node that uses Apache, Nginx, Flask and many other things were vulnerable to this attack.
  • This vulnerability is incredibly simple and I am astonished this went unnoticed for 4 years (since 2017). As an attacker, I would be rather lucky than good!