AI Generated Content Disclaimer
Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.
Python for Web Pen-testers (Snake bites) was presented at c0c0n 2013. The deck introduces working web penetration testers to Python’s practical side: why the language fits security tooling, the modules worth learning first, live builds of small tools for CMS fingerprinting, XSS fuzzing, and SVN extraction, and how to package the results so they run anywhere from laptops to Android phones.
The talk set the scope up front: the presentation is only focused on Python, with no comparisons to other languages, the idea is to give a regular web penetration tester a head start with the functionalities available in Python, and there is no new tool release in the deck. The why slide made the case: an easy and flexible language, a massive module base allowing use cases to be written in a small timeframe and codebase, inbuilt language support in tools like Burp and IRONWASP, API support from OWASP-ZAP, room for custom application logic, or simply just for the fact that you can do it. A slide of existing tools anchored the claim, running from w3af and sqlmap through Scapy, Canvas, Sulley, and Peach to SpikeProxy, ProxyStrike, wapiti, and MyNav Idapython.
Variations got a warning slide: Cython, Jython, and IronPython exist, and Python 2.X versus 3.X must be treated as two different things. The module tour then covered three workhorses. Requests replaces urllib2 as the HTTP handler, deals with the http or https transition internally, and exposes a simpler interface: requests.get, with r.text or r.content for the body, r.status_code, and r.headers. BeautifulSoup parses text and HTML, demonstrated by finding each div with class attachment to enumerate WordPress attachments from a fetched page. Argparse builds quick command-line programs with options and switches, shown with a required –url argument and a –debug store_true flag.
Three scenario demos followed. Regular expression pattern matching fingerprinted CMS platforms from page content: a regex keyed on wp-content inside stylesheet link tags detected WordPress, and one keyed on sites/default/themes or all in link and style tags detected Drupal. A simple XSS fuzzer read payloads from a file, URL-encoded each row, requested the target URL with the payload appended, and printed any row that came back reflected in the response. The SVN extractor, published at github.com/anantshri/svn-extractor with a write-up on the blog, pulls all web resources from .SVN folders exposed over a network.
The closing material covered distribution and learning. PyInstaller packages every dependency into a single executable for one-click sharing without a Python dependency, and Python for Android puts Python 2.7 on the phone through SL4A, removing the ssh-or-laptop restriction. The learning path listed Learn Python the Hard Way, Dive into Python, SPSE or other online certification courses, Violent Python, and Grey-hat Python, plus daily use and the inbuilt hooks in IRONWASP inline scripting and Burp extensions, with thanks recorded to the null community members who sharpened the material.
“Presentation is only focused on python. (No comparisons with other languages please)”
“Idea is to introduce a regular web penetration tester with various functionalities available in Python and give them a head start”
“There is no new tools release”
“JUST FOR THE FACT THAT YOU CAN DO IT”
“PyInstaller packages every dependency into a single executable package”
“Ssh or laptop are not the restrictions now.”