---
title: "XXE-scape through the front door: circumventing the firewall with HTTP request smuggling"
url: https://cybernoz.com/xxe-scape-through-the-front-door-circumventing-the-firewall-with-http-request-smuggling-2/
type: post
date: 2023-08-23T09:12:49+03:00
modified: 2023-08-23T09:12:57+03:00
author: Cybernoz
categories: [Mix]
site: Cybernoz
description: "Table of Contents The Hole in the Wall The Great Escape Lessons learned Timeline In this write-up, I want to share a cool way in&hellip;"
---

# XXE-scape through the front door: circumventing the firewall with HTTP request smuggling

Table of Contents

1. [The Hole in the Wall](#section-the-hole-in-the-wall)
2. [The Great Escape](#section-the-great-escape)
3. [Lessons learned](#section-lessons-learned)
4. [Timeline](#section-timeline)

[![](https://image.cybernoz.com/aff/hostinger.webp)](https://hostinger.com.tr?REFERRALCODE=Cybernoz)

In this write-up, I want to share a cool way in which I was able to bypass firewall limitations that were stopping me from successfully exploiting an XML External Entity injection (XXE) vulnerability. By combining the XXE with a separate HTTP request smuggling vulnerability, I was able to grab some secret information and escape through the front door. Let’s go!

*A fire escape, because this write-up is about escaping a firewall. It’s a little joke.*

## The Hole in the Wall

The story starts when Burp Suite pointed out that a file upload endpoint was parsing the embedded XML in some image file formats, which it was able to determine because the embedded external entities triggered a DNS request to the Burp Collaborator.

![](https://honoki.net/wp-content/uploads/2020/03/afbeelding-2.png)

*The generated report by the excellent UploadScanner extension for Burp Suite.*

Funnily enough, this report had been sitting in my Burp project file for more than two months before I finally noticed it. When I did, I quickly started playing with the payloads to see if I could verify this finding, and maybe trigger an HTTP request rather than DNS only.

##### Sidenote

When exploiting an XXE vulnerability, it is important that you can reference your own external Document Type Definition (DTD) file. While internal DTD declarations are possible, they do not typically allow the advanced markup that makes an XXE attack so powerful. To reference an external DTD file, outgoing HTTP request traffic should be allowed.

In my earlier post “*From blind XXE to root-level file read access*“, I explain this limitation and another way to circumvent the limitation of a firewall that blocked outgoing HTTP traffic.

Too bad. I found myself unable to trigger outgoing HTTP requests using any of the tricks that had worked for me in similar scenarios before: I couldn’t find an unpatched Jira to serve as a proxy, nor was the `gopher` protocol enabled to try and leverage existing proxy servers on the company network:

> I was able to get out of a firewalled network environment by making use of the gopher protocol and an internal proxy server. Now I want to show you what I did:
>
>
>
> gopher://:8080/_GET http://
>
>
>
> [https://twitter.com/honoki/status/1118784207696822272?ref_src=twsrc%5Etfw](https://twitter.com/honoki/status/1118784207696822272?ref_src=twsrc%5Etfw)

```

```

```

```

![](https://honoki.net/wp-content/uploads/2020/03/afbeelding-3.png)

```

```

```

```

```

```

```

```

```

```

![](https://honoki.net/wp-content/uploads/2020/03/afbeelding.png)

[![](https://image.cybernoz.com/aff/bunny.png)](https://bunny.net?ref=4buc1qv1m5)

[https://honoki.net/2020/03/18/xxe-scape-through-the-front-door-circumventing-the-firewall-with-http-request-smuggling/](https://honoki.net/2020/03/18/xxe-scape-through-the-front-door-circumventing-the-firewall-with-http-request-smuggling/)
