SEC504: Hacker Tools, Techniques, and Incident Handling

Experience SANS training through course previews.
Learn MoreLet us help.
Contact usConnect, learn, and share with other cybersecurity professionals
Engage, challenge, and network with fellow CISOs in this exclusive community of security leaders
Become a member for instant access to our free resources.
Sign UpMission-focused cybersecurity training for government, defense, and education
Explore industry-specific programming and customized training solutions
Sponsor a SANS event or research paper
We're here to help.
Contact UsFoursquare is a mobile app that lets you "check in" to a location and tell your friends about it. If you check in someplace often enough you can, among other things, become the "mayor" of that location. If you're the mayor you can even sometimes win free food [1]. Normally, people are supposed to actually visit the physical location to earn a mayorship or associated badges but Jim Bumgardner recently showed how he could, without physically visiting the location in question, become the mayor of various spots all over the world, including the North Pole [2,3,4].
In his case, he used Foursquare's API to check himself in to various locations by using curl from the command line:
curl -u EMAIL:PASSWORD -d "vid=993842" http://api.foursquare.com/v1/checkin
As you can see he actually authenticates to Foursquare using a valid email and password. But once authenticated, Foursquare doesn't validate that you're at the location itself. Granted, there are other issues that Foursquare has to consider in relation to fake check ins but, essentially, the service is not validating that Jim is authorized to check in to that particular location.
CWE-285 is about improper access control [5]. In general, applications should allow access only to those who are permitted. This means preventing users from directly invoking functionality when they don't have the proper permissions. This is usually accomplished by designing your application to enforce access control checks at the appropriate boundaries like URLs or even method calls in your business service layer. This should be done with a default deny policy.
Frank Kim is the Founder of ThinkSec, a security consulting and CISO advisory firm. He leads the Cybersecurity Leadership and Cloud Security curricula at SANS, as well as authors and instructs multiple SANS courses.
Read more about Frank Kim