Thursday, March 21, 2013

Learning Web App Security with Google Gruyere

I've been developing web applications for almost 10 years now, but I was rarely concerned with application security issues. To be sure, I am a defensive programmer, meaning that I do all kinds of checks on the inputs received by my functions, leaving very little to chance. But although I heard much about cross site scripting (XSS) and SQL injection, I didn't have a very clear understanding of these concepts. I relied on best practices (like parametrized database queries) and inherent ASP.NET features like request validation to take care of malicious inputs, be it form variables or query string parameters.

Yet I always had a gnawing feeling that I should get more understanding of web app vulnerabilities, attacks and defenses. So this month I started to look for way of how I can brush up on this important topic.

I found a couple of books, of which this one seems to collect a lot of praise from readers: The Web Application Hacker's Handbook (WAHH). I started to read the book, but I also wanted something more practical. I came across Open Web Application Security Project (OWASP) with its plenitude of resources and the famous OWASP Top 10 list of web app security flaws.

OWASP members also develop security software such as the security testing tool ZAP and the request intercepter proxy WebScarab. Both I really handy and easy to use.

OWASP has also produced WebGoat, a fictitious web application full of vulnerabilities that you can run and test locally on your PC. WebGoat has a number of lessons to teach about various security flaws that you can try to discover on your own with the help of some hints. Although a great resource, I found WebGoat somewhat lacking in the quality of their materials.

And then I stumbled upon Google Gruyere, which is a very elaborate web security code lab from Google Code University. It is much similar to WebGoat in that it gives you a sandbox to learn about and try to dicover security flaws in a Python web application that you can run either locally or online. It does a great job of explaining various security concepts and provides challenges to explore them in practice as well as guidance on how to guard against them. It is especially good at explaining the various flavors of XSS attacks, but it also provides a good foundation for understanding many other topics such as path traversal, denial of service and code execution. It touches upon but doesn't go into the details of SQL injection.

Learn how to make web apps more
secure. Do the Gruyere codelab.

I've gone through the lab and thoroughly enjoyed the challenges and learned to use the tools like WebScarab and ZAP. I'd recommend it to anyone interested in web application security!

In parallel I did some security testing of the web applications that I've been involved with for the last year or so. I found that ASP.NET does a great job protecting ASP.NET applications from certain types of attacks out of the box. I found some minor flaws that are mostly due to relying too much on client side validation and forgetting to validate user input again on the server. A quite trivial example of this is being able to intercept a request and change the house number to a negative value. But I also discovered a more serious exploit using the same technique, which I will not describe here :)

The main lesson that I've drawn so far is that we should never trust input coming into our applications, be it through a web browser or a web API. Most security flaws in software result from sloppy programming. Web developers should be well aware of these issues and write their code defensively and test it thoroughly not only from the point of view of functionality but also security-wise.

To sum up, these have been very interesting and instructive few weeks. Web application security is a fascinating topic and I look forward to diving even deeper into it!

Happy coding!


12 comments:

  1. I have tried so many means to get professional hacking but none worked until I met Cryptocyberhacker@gmail.com who helped me to hack my man's cell phone. Just found out my man had kids with this woman from Tennessee with power of this great Cryptocyberhacker@gmail.com
    you too can get in touch with them via Cryptocyberhacker@gmail.com

    ReplyDelete
    Replies
    1. Need The To Hire A Hacker❓ Then contact PYTHONAX✅

      The really amazing deal about contacting PYTHONAX is that the Hack done by us can’t get traced to you, as every Hacking job we do is strongly protected by our Firewall. It’s like saying if anyone tries to trace the Hack, it will lead them to us and we block whatever actions they are doing.

      We have been Invisible to Authorities for almost a decade now and if you google PYTHONAX, not really about us comes out, you can only see comments made by us or about us.

      Another Amazing thing to you benefit from Hiring our Hackers is that you get a Legit and the best Hacking service, As we provide you with Professional Hackers who have their Hacking Areas of specialization.
      We perform every Hack there is, using special Hacking tools we get from the dark web.

      Some list of Hacking Services we provide are-:
      ▪️Phone Hacking & Cloning ✅
      ▪️Computer Hacking ✅
      ▪️Emails & Social Media Account Hacking✅
      ▪️Recovering Deleted Files✅
      ▪️Tracking & Finding People ✅
      ▪️Hunting Down Scammers✅
      ▪️Hack detecting ✅
      ▪️Stealing/Copying Files & Documents From Restricted Networks and Servers ✅

      OTHER SPECIAL HACKING SERVICES

      ▪️Binary Option Recovery ✅
      ▪️Scam Money Recovery✅
      ▪️Bitcoin Multiplication✅
      ▪️Change Of Grades In Universities/Colleges ✅
      ▪️Phone Calls Monitoring✅
      ▪️keyLogging Installation✅
      ▪️Remote Access Trojan (RAT) installation ✅
      ▪️Cyber Security Upgrade✅
      ▪️And lots more...........

      Whatever Hacking service you require, just give us an Email using the Emails Address provided below.
      pythonaxhacks@gmail.com
      pythonaxservices@gmail.com

      PYTHONAX.
      2020 © All Right Reserved.

      Delete
  2. Thanks for explaining the use of Google Gruyere for web app security. Our mobile app development company in Jaipur focuses on delivering well tested and secure mobile apps.

    ReplyDelete
  3. I have used a few of these hackers recommended here and non of them was up to the task except internetwebport737 at gmail dot com, I lost some money to others before I finally got linked to him. In my opinion he is the best, I have been able to monitor my husband’s phones and computer and the hack is still functional till date. If you need a good hacking service I strongly recommend you contact him and you can thank me later, you can also call or Text +17853259842

    ReplyDelete




  4. CONTACT US FOR ALL KINDS OF HACKING JOB @ chauphampham42@gmail.com We offer professional hacking services , we offer the following services;
    -University grades changing
    -Bank accounts hack
    -Erase criminal records hack
    -Facebook hack
    -Twitters hack
    -email accounts hack
    -Grade Changes hack
    -Website crashed hack
    -server crashed hack
    -Skype hack
    -Databases hack
    -Word Press Blogs hack
    -Individual computers hack
    Control devices remotely hack
    -Burner Numbers hack
    -Verified Paypal Accounts hack
    -Any social media account hack
    -Android & iPhone Hack
    -Text message interception hack
    -email interception hack
    -Untraceable Ip etc.
    Contact us at chauphampham42@gmail.com or text or call (601) 357-3187 for more inquiry..
    Track Calls log and Spy Call Recording.
    Monitoring SMS text messages remotely.
    Cell phone GPS location tracking. Spy on Whatsapp Messages.
    Free Update and 100% Undetectable.
    Track BBM messages and Line messages. Track Internet Browsing History and Read phone Access Address Book, totally worth your money, please no time wasters, he won't under any circumstances work for free, you can reach him by email chauphampham42@gmail.com or add on Hangout or call on (601) 357-3187 and text

    ReplyDelete
  5. They are all scammers, they will make you pay after which they will give you an excuse asking you to pay more money, they have ripped me of $2000, i promised i was going to expose them.
    I figured it all out when my colleague took me to Pavel

    (HACKINTECHNOLOGY@GMAIL.COM)
    CELL PHONE +16692252253

    He did perfect job, he hacks all accounts ranging from (Emails, Facebook, whatsapp, imo, skype, instagram, Phone cloning, DMV removal, tracking locations, background checks Kik etc. he also hacks cell phones, cell phone tapping and cloning, clears bad driving and criminal records, bank transfers, locates missing individuals e.t.c. You should contact him and please stop using contacts you see on websites to execute jobs for you, you can ask around to find a real hacker.

    ReplyDelete
  6. They are all scammers, they will make you pay after which they will give you an excuse asking you to pay more money, they have ripped me of $2000, i promised i was going to expose them.
    I figured it all out when my colleague took me to Pavel

    (HACKINTECHNOLOGY@GMAIL.COM)
    CELL PHONE +16692252253

    He did perfect job, he hacks all accounts ranging from (Emails, Facebook, whatsapp, imo, skype, instagram, Phone cloning, DMV removal, tracking locations, background checks Kik etc. he also hacks cell phones, cell phone tapping and cloning, clears bad driving and criminal records, bank transfers, locates missing individuals e.t.c. You should contact him and please stop using contacts you see on websites to execute jobs for you, you can ask around to find a real hacker.

    ReplyDelete
  7. Welcome. BE NOT TROUBLED anymore. you’re at the right place. Nothing like having trustworthy hackers. have you lost

    money before or bitcoins and are looking for a hacker to get your money back? You should contact us right away it’s

    very affordable and we give guarante to our clients. Our hacking services are as follows:
    -hack into any nkind of phone
    _Increase Credit Scores
    _western union, bitcoin and money gram hacking
    _criminal records deletion
    _Hacking of phones(that of your spouse, boss, friends, and see whatever is being discussed behind your back)
    _Security system hacking...and so much more. Contact THEM now and get whatever you want at
    Superior.hack@gmail.com
    +16692252253

    ReplyDelete
  8. Do you need to hack into any, databaseserver spy on Facebook,Emails, Whatsapp, Viber, Snapchat, Instagram and many more.
    I urge you to get in touch with the best people for the job, i have confirm the service when i need to spy on my spouse phone. They are good at Phone Cloning and Bitcoin/binary minning and any other hack job.
    Thanks guys for the team work HACKINTECHNOLOGYATGMAILDOTCOM
    +12132951376(WHATSAPP)

    ReplyDelete
  9. HAVE YOU BEEN IN SEARCH FOR GENUINE HACKER'S ONLINE?. HAVE YOU LOST YOUR MONEY TO BINARY OPTION SCAM OR ANY ONLINE SCAM WHATSOEVER?. WELL, YOU HAVE FOUND REDEMPTION IN ASORE CORP.
    asorehackcorp@gmail.com

    Asore Corp is a group of multinational Hacker's, an affiliate of Evil Corp. We make sure by all means necessary that our clients get the best of services on a🔐PAYMENT AFTER JOB IS DONE BASIS✅. Rather than send money and trust a criminal to fulfill your deal, you can make sure the job is done before WORKMANSHIP is paid for. You'll get excellent customer service.
    That's a 100% guarantee. Our Cyber security Technicians are on standby 24/7 to receive your job requests.

    ⚠️ BEWARE OF FRAUDSTARS looking to hoax.
    if you have been a VICTIM, contact : ✉️cyberprecinct@gmail.com for directives.
    Here, it's always a win for you.

    🔸OUR SERVICES🔸
    ➡️Binary Option funds recovery
    ➡️Social media hack
    ➡️Recovery of loan scam
    ➡️Credit repair (Equifax,Experian,Transunion)
    ➡️E mail hack
    ➡️College score upgrade
    ➡️Android & iPhone Hack
    ➡️Website design
    ➡️Website hack
    And lots more.

    DISCLAIMER: Asore Cyber Corp accepts no responsibility for any information,previously given to anybody by clients on as regarding the job. Asore Cyber Corp will not distribute contact information collected on any hacking job other than in the Asore corps Hacker's listings themselves, and will not sell contact information to third parties.

    CONTACT INFO:
    📧 asorehackcorp@gmail.com
    cyberprecinct@gmail.com

    Copyright ©️
    Asore Cyber Corp 2021.
    All rights reserved.

    ReplyDelete
  10. If you are looking for a professional hacker to provide hacking solutions on (Wizardbrixton AT Gmail.com )

    -Social media hacks

    -Company Email hacks

    -Phone hacks

    -Email hack: Gmail, AOL, Yahoo mail, Proton-mail etc,

    -Mobile phone (call and text message Hacking are available also)

    -ATM hack,

    -Account hack

    -Spy on a cheating Husband/wife

    -Retrieval of lost documents

    -School result upgrading

    -Bitcoin recovering

    -Hack into bitcoin with large coins

    -Binary option funds recovery and lot more, search no further.


    I fully recommend you to contact him he will help you recovered all data you have lost on a phone and helped in tracking the phone till you got the proof of lost , contact him ( Wizardbrixton@gmail.com) Whatsapps : (+1- /807-23 ) 4-0428

    ReplyDelete
  11. Hello friends, I’m from London and I’m using this medium to testify to the genuine work of an Hack Pro and PIA.When it comes to hacking although, I never believed it could be possible for me to access someone device without touching it but after contacting the hack pro (Larrywizardhacking57@gmail.com), now I know better.They hack all social media platforms, smartphones, bank Accounts, help recover stolen crypto and even more.
    Quite amazing.You can also contact him via WhatsApp
    Text:+1(2135297780).

    ReplyDelete