Jump to content
Fi8sVrs

''Reversing'' Non-Proxy Aware HTTPS Thick Clients w/ Burp

Recommended Posts

  • Active Members

A little over a month ago, I published a Metasploit auxiliary module for brute-forcing Cisco ASDM logins that accompanied one of our TrustKeeper Scan Engine updates. Shortly afterwards, I received requests from a couple people to share how I was able to get access to the inside of the ASDM transport layer, which is encrypted with SSL.

Well, the short answer is that SSL isn’t really that much of a hurdle if the thick client you're reversing doesn’t verify the validity of the SSL certificates it’s being presented with.

The longer answer, and one I hope to answer during the course of this post, is that Burp makes “middling” non-proxy aware HTTPS thick clients (like ASDM) a pretty simple and straight forward process and I’ll show you how.

Overview of the Process

The process for “reversing” the transport communications of these thick clients is as follows:

  1. Obtain a thick client that uses HTTPS transport
  2. Obtain a copy of Burp
  3. Start Burp with admin privileges
  4. Add a Proxy Listener w/ Redirection and Invisible Proxying
  5. Connect to proxy listener as if it was a server
  6. Have fun…

Sounds pretty easy, right? Well, let's get started then.

Obtaining a Thick Client

The first step to getting inside a thick client's transport layer is choosing a thick client to play around with. A "thick client", for the purposes of this post, is really any client application that you would download and run to connect to a server application. I ended up using the Cisco ASDM client because I was focused on solving a specific problem, but the concepts and techniques can be repeated on most thick clients that don’t do certificate validation. I encourage you to grab a copy of ASDM (if you’ve got an ASA) or pick a different thick client and follow along.

Obtaining a Copy of Burp

Go here and grab a free copy of Burp:

Download Burp Suite

All the stuff we’ll be talking about that uses Burp can be accomplished using the free version.

Starting Burp with Admin Privileges

So with a bit of caution and your fingers and toes crossed, you’re going to need to start up Burp with admin privileges. This may make some of you feel a little uncomfortable being that Burp is written in Java, but you’re going to need to give Burp additional privileges in a later step in this post.

If running Java with admin privileges is still tugging at your spidey senses, you are welcome to run without admin privileges and bind to a port in the ephemeral port range. The only shortfall of doing this is that your thick client application may or may not allow you to change the server port that it connects to. If it doesn't allow you to change the port, you will need admin privileges to proceed.

You can invoke Burp with admin privileges like this on Linux or Mac:

sudo java -jar burpsuite_pro_v1.5.20.jar

You can also add your own creative flair to the options supplied by this command and give Burp more memory, but that is outside of the scope of what we’ll need to get the job done.

Adding a Proxy Listener w/ Redirection and Transport Proxying

Ok, now we’re getting to the interesting stuff. This is going to require a little bit more explanation because it’s not a scenario you would see often.

In the default Proxy Listener configuration that most people who use Burp are familiar with, you are provided with a CONNECT proxy listener bound to the loopback adapter on port 8080. This allows us to explicitly tell our browser where the proxy listener is and how to communicate with it.

The difference when using a thick client that is not proxy aware is the need for the ability to point the thick client to the proxy. We need to do this because this is what will allow the proxy to see all the requests sent to the server. We can do this by adding an additional proxy listener on the loopback adapter and configuring it to act as the legitimate server to which the thick client needs to connect.

Let's look at some screenshots on how to do this:

Step 1: Visit the Proxy => Options configuration tab

6a0133f264aa62970b01a5116af210970c_800wi.png

Note:This is the default listener that is provided in Burp

Step 2: Click Add to add a proxy listener and add the bind port on the loopback

6a0133f264aa62970b01a73d764e8e970d_800wi.png

Note: You can use the server port (ie. port 443 in the case of Cisco ASDM) if you invoked Burp with admin privileges, if not, choose something in the ephemeral range and then use that port later when you connect with the client.

Step 3: Set a Redirect Host and Port and Enable Invisible Proxying

6a0133f264aa62970b01a3fcbb43db970b_800wi.png

Note: The redirect “binds” your locally mapped port to the remote service forming an SSL proxy that Burp can inspect. The invisible proxying tells Burp that its interface should be an emulated web server interface rather than the typical proxy style interface that’s used by default.

Connect to the New Proxy Listener

Now that we have everything all setup and ready, we can now take the Cisco ASDM client and connect to the newly created proxy listener as if it was the Cisco ASA device. So we fire up the Cisco ASDM client and point it at our proxy listener, like so:

6a0133f264aa62970b01a3fcbb43f9970b_800wi.png

Note: Make sure you have the proxy intercept feature disabled, or authentication will timeout waiting for you to advance all the requests it needs to make to fully run.

As the ASDM client attempts to login, you will see that the site map within Burp will begin to populate with all the various paths that are used by the ASDM client to gather information and configure the Cisco ASA.

Here’s an example of what my site map looks like once ASDM has fully loaded.

6a0133f264aa62970b01a5116af304970c_800wi.png

This tells us a lot about how the ASDM client works including its authentication process which in the very first request that is made to the firewall:

6a0133f264aa62970b01a5116af334970c_800wi.png

As you can see the authentication is merely a post request that can be easily replicated in a script to quickly automate the process of credential checking Cisco ASA ASDM logins. This is what was actually captured in the Metasploit module I mentioned above.

We can also leverage many of these paths that we can now see to perform the ASDM administration tasks directly without needing to deal with the restrictions imposed by the thick client interface. This also makes us more aware of the server attack surface so we can perform a more thorough assessment of the application.

Conclusions

So there you have it. That’s how easy it is to “reverse” the HTTPS transport layer of a thick client using some built-in features within Burp Suite. Not so bad, right?

Well, I encourage you to find a thick client that you use in your daily work and use this process to see how it works under the hood. Maybe you can help automate some security checks for yourself or even use this process to help automate some administration tasks that were previously thought to be impossible.

Either way, I’d be really happy to hear from anyone who reads this post and follows this process to see what his or her thick clients are doing inside the transport layer.

See you next time!

Source

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...