News for hackers. Stuff that matters.
Re:Proxy.app Lands In App Store by tptacek on Wednesday May 21, 2014 @11:24AM (#7778716)
To replace Burp, you need at a minimum a proxy that reliably works at high speed on a huge variety of sites, a UI for capturing, altering, and resending requests, and a "fuzzer" that will transform a template request according to a ruleset.

This turns out to be a pretty difficult thing to build well. Every pentester who can code that owns a Mac wants to rewrite Burp; I myself have died on that hill several times. But rewriting Burp is a bit like rewriting Microsoft Word; so much of the value is in the details, and there are so. many. details.

Re:Proxy.app Lands In App Store by billyhoffman on Wednesday May 21, 2014 @12:36PM (#7779156)
I think its important to say why it's difficult. The individual components of a web proxy/fuzzer range from easy to more challenging. At the extreme edge, they can get pretty hard:

HTTP proxy - Fairly trivial, annoyingly harder if you want to generate certs to MitM SSL.

Scaling it out - not too bad. fuzzing is highly parallelizable. How your parallel tasks work together is more challenging, (think rotating cookies) but do able, and you need to really do this right to maximize requests/seconds.

The audits themselves - If you actually want pre-built attacks, basic attack+response regexs (ala Nikto) are very easy, though building the DB is time consuming. Multi-request tests (looking for stored XSS, etc) are harder because an audit thread need to share state, or become somewhat sequential.

Dealing with the modern web - Harder. You need a JavaScript interpreter. I used Spidermonkey years ago, PhantomJS and the like more recently. Also means you need to support different packaging formats like JSON, MVC-style path parameters, etc and the associated escaping.

Keeping state - Harder. What does logged out look like? How do you detect this? (and no, don't make the user supply a Regex...) Has you audit screwed up your account so that "logged in" is all jacked up? Was there Stored XSS, but another audit clobbered the payload before your sweeper found the reflected value? (think updating your address on one page, displaying it on another, all while multiple things are auditing that update address form...)

All that said, I have found the main challenge people overlook when writing web pen test tools is the UI/UX. A shitty UI/UX ruins a tool because it ruins your flow. How do I specify what to fuzz with what rules? Can I resuse and reapply settings easily, how are results reported? Can I easily mark something as a false positive? But can I do that in a general way so that all issues matching on this host, or this file, or this URL frag are ignored? etc etc etc.

Please, if you are going to go down this path, think about how people are going to use the tool, and focus on maximizing their throughput.

Re:Proxy.app Lands In App Store by tptacek on Wednesday May 21, 2014 @01:14PM (#7779409)
I don't use bleeding-edge Burp, but whatever the version I run is, it doesn't have a Javascript interpreter, or for that matter a modern HTML engine. I'm also considering only the parts of Burp that are valuable for developers in general; things like stored attack vectors, like Nikto uses, are generally verboten on our team anyways.

So, if you asked me what the hard parts of getting Burp right when I took a stab at replacing it in Cocoa, and more recently in ko.js and Riak (more successfully):

* There is just a whole lot of UI involved in making a navigable proxy with the breakdowns you want, and, in particular, with editing and annotating raw requests and having those views do the "right thing" as the user edits the request and flips back and forth between views.

* Storage of requests is hard, because it's not intuitive how they need to be stored. The proxy wants long-term storage with indexes; the repeater wants rapid writes; the fuzzer wants to generate a shitload of requests (multiplying one request by 20k isn't rare), and a request from one part of the system can bounce through all the other parts.

* The proxy wants realtime communication/control with the UI, because some of your requests need to be intercepted and modified before delivery; in Burp, that UI shares most of the controls of the Repeater, which is surprisingly complicated.

Network performance is the easiest part of this to get right. Just don't use Java threads, and use a real timer library. But getting the network performance to cooperate with persistent storage is harder, unless you just let storage and memory explode.

We wanted fine-grained control over all of the tools so that we could automate retesting and regression. Like I said, we had a lot of luck hoisting the components of Burp into a series of web applications and backend systems backed by Riak (and Postgres, for search, index, and UI). We replaced Intruder with a command-line tool written in Golang that has a small specification language for the rules, instead of Burp's clunky interface, but there's still a whole lot of UI involved in parsing a request, automatically finding the places to template-ize, and then allowing the user to alter those selections.

When I took my stab at doing this in Cocoa a few years ago, I made a beeline for NSWebView; having a real webkit render is an enormous win. We do something similar to you with headless webkit now. This is a place Burp is genuinely constrained, due to Java.

Unfortunately, replacing Burp is a bitch.

Re:Proxy.app Lands In App Store by passfree on Wednesday May 21, 2014 @06:38PM (#7781167)
Interesting. We have those libraries already written so if you let us know what you are building we may be able to help.
Re:Proxy.app Lands In App Store by tptacek on Wednesday May 21, 2014 @08:56PM (#7781587)
I'm sorry it sounds like I'm running you down; I don't mean to, and I really hope you succeed, because as much as I respect Burp, I respect it the same way I respect Microsoft Word: as something I would like to use less of.

It just happens that this is a conversation that happens semiweekly at Matasano. :)

Re:Proxy.app Lands In App Store by passfree on Wednesday May 21, 2014 @01:11PM (#7779393)
Hi Billy. I wonder if you are the same Billy I met years ago. :) If yes, long time no hear.

These are all valid points. Writing security tools is technically very challenging even for the most basic things. Even a spider, regardless how basic this looks like in principle, is really hard once you get down to implementation. "In theory there is no difference between theory and reality but in reality there is."

This is why I am a big believer at simplifying the workflows in order to be more manageable. One of these workflows is recording requests and responses generated to/from the application. This is what Proxy.app does well. This feature can be extended further by other tools which we have already developed.

Re:Proxy.app Lands In App Store by tptacek on Wednesday May 21, 2014 @01:27PM (#7779481)
Pretty sure that's "the" Billy Hoffman. :)
Re:Proxy.app Lands In App Store by passfree on Wednesday May 21, 2014 @11:52AM (#7778883)
Hi tptacek,

Proxy.app is not meant to compete with Burp. Burp is a different beast and not necessarily, in our humble opinion, the best approach to penetration testing web applications. We know how difficult it is to write security tools because this is what we specialise doing. So you comment resonates with us very well.

Although we could have bundled-in all our security testing frameworks, it was decided to take a different approach for the time being. Later on we may decide to add security testing capabilities or these features may be provided by some of the other tools that we are currently working on.

Re:Proxy.app Lands In App Store by zellyn on Wednesday May 21, 2014 @12:09PM (#7778984)
If you're not trying to compete with Burp, you may want to remove it from the sentence, "While there were plenty of proxies such as Burp, ZAP and Charles…"
Re:Proxy.app Lands In App Store by passfree on Wednesday May 21, 2014 @12:15PM (#7779029)
Badly phrased. It will compete with Burp but not as a one-size-fits-all type of security solution.