Skip to Content
Web Application Defender's Cookbook
book

Web Application Defender's Cookbook

by Ryan C. Barnett, Jeremiah Grossman
December 2012
Intermediate to advanced
552 pages
13h 16m
English
Wiley
Content preview from Web Application Defender's Cookbook
Recipe 4-2: Identifying Suspicious Open Proxy Usage
This recipe demonstrates how to use the MaxMind GeoIP database data to identify when clients are using open proxy servers from geographic regions that are different from where they live.
Ingredients
  • MaxMind’s GeoLite City Database2
  • ModSecurity
    • SecGeoLookupDb directive
    • @geoLookup action
    • GEO variables
The use of open proxy servers by itself does not equate to malicious intent. A client might not want to connect to a web site directly for a variety of legitimate privacy reasons. Furthermore, many proxying scenarios related to various ISPs for mobile clients dynamically reroute clients through caching proxy servers and then onto the destination site if content is unavailable. These scenarios mainly utilize proxy servers within the same geographic country codes. Malicious clients, on the other hand, routinely route their traffic through proxy servers from different countries. Their motivation for doing so is to make IP traceback efforts more challenging. Let’s look at these requests. Here is a sample ModSecurity audit log entry for a proxy request:
--f2e56119-A--
[05/Jan/2012:11:47:13 --0600] hbhwWsCo8AoAABc8eGUAAAAb 220.255.1.40 57253 192.168.240.10 80 --f2e56119-B-- GET /demo.testfire.net/ HTTP/1.1 Host: www.modsecurity.org Connection: keep-alive User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 Accept: */* Accept-Encoding: gzip,deflate,sdch Accept-Language: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Web Site Cookbook

Web Site Cookbook

Doug Addison

Publisher Resources

ISBN: 9781118417058Purchase book