Thursday, June 1, 2023

Smuggler - An HTTP Request Smuggling / Desync Testing Tool


An HTTP Request Smuggling / Desync testing tool written in Python 3


IMPORTANT

This tool does not guarantee no false-positives or false-negatives. Just because a mutation may report OK does not mean there isn't a desync issue, but more importantly just because the tool indicates a potential desync issue does not mean there definitely exists one. The script may encounter request processors from large entities (i.e. Google/AWS/Yahoo/Akamai/etc..) that may show false positive results.


Installation

  1. git clone https://github.com/defparam/smuggler.git
  2. cd smuggler
  3. python3 smuggler.py -h

Example Usage

Single Host:

python3 smuggler.py -u <URL>

List of hosts:

cat list_of_hosts.txt | python3 smuggler.py

Options

usage: smuggler.py [-h] [-u URL] [-v VHOST] [-x] [-m METHOD] [-l LOG] [-q]
[-t TIMEOUT] [--no-color] [-c CONFIGFILE]

optional arguments:
-h, --help show this help message and exit
-u URL, --url URL Target URL with Endpoint
-v VHOST, --vhost VHOST
Specify a virtual host
-x, --exit_early Exit scan on first finding
-m METHOD, --method METHOD
HTTP method to use (e.g GET, POST) Default: POST
-l LOG, --log LOG Specify a log file
-q, --quiet Quiet mode will only log issues found
-t TIMEOUT, --timeout TIMEOUT
Socket timeout value Default: 5
--no-color Suppress color codes
-c CONFIGFILE, --configfile CONFIGFILE
Filepath to the configuration file of payloads

Smuggler at a minimum requires either a URL via the -u/--url argument or a list of URLs piped into the script via stdin. If the URL specifies https:// then Smuggler will connect to the host:port using SSL/TLS. If the URL specifies http:// then no SSL/TLS will be used at all. If only the host is specified, then the script will default to https://

Use -v/--vhost <host> to specify a different host header from the server address

Use -x/--exit_early to exit the scan of a given server when a potential issue is found. In piped mode smuggler will just continue to the next host on the list

Use -m/--method <method> to specify a different HTTP verb from POST (i.e GET/PUT/PATCH/OPTIONS/CONNECT/TRACE/DELETE/HEAD/etc...)

Use -l/--log <file> to write output to file as well as stdout

Use -q/--quiet reduce verbosity and only log issues found

Use -t/--timeout <value> to specify the socket timeout. The value should be high enough to conclude that the socket is hanging, but low enough to speed up testing (default: 5)

Use --no-color to suppress the output color codes printed to stdout (logs by default don't include color codes)

Use -c/--configfile <configfile> to specify your smuggler mutation configuration file (default: default.py)


Config Files

Configuration files are python files that exist in the ./config directory of smuggler. These files describe the content of the HTTP requests and the transfer-encoding mutations to test.

Here is example content of default.py:

def render_template(gadget):
RN = "\r\n"
p = Payload()
p.header = "__METHOD__ __ENDPOINT__?cb=__RANDOM__ HTTP/1.1" + RN
# p.header += "Transfer-Encoding: chunked" +RN
p.header += gadget + RN
p.header += "Host: __HOST__" + RN
p.header += "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36" + RN
p.header += "Content-type: application/x-www-form-urlencoded; charset=UTF-8" + RN
p.header += "Content-Length: __REPLACE_CL__" + RN
return p


mutations["nameprefix1"] = render_template(" Transfer-Encoding: chunked")
mutations["tabprefix1"] = render_template("Transfer-Encoding:\tchunked")
mutations["tabprefix2"] = render_template("Transfer-Encoding\t:\tchunked")
mutations["space1"] = render_template("Transfer-Encoding : chunked")

for i in [0x1,0x4,0x8,0x9,0xa,0xb,0xc,0xd,0x1F,0x20,0x7f,0xA0,0xFF]:
mutations["midspace-% 02x"%i] = render_template("Transfer-Encoding:%cchunked"%(i))
mutations["postspace-%02x"%i] = render_template("Transfer-Encoding%c: chunked"%(i))
mutations["prespace-%02x"%i] = render_template("%cTransfer-Encoding: chunked"%(i))
mutations["endspace-%02x"%i] = render_template("Transfer-Encoding: chunked%c"%(i))
mutations["xprespace-%02x"%i] = render_template("X: X%cTransfer-Encoding: chunked"%(i))
mutations["endspacex-%02x"%i] = render_template("Transfer-Encoding: chunked%cX: X"%(i))
mutations["rxprespace-%02x"%i] = render_template("X: X\r%cTransfer-Encoding: chunked"%(i))
mutations["xnprespace-%02x"%i] = render_template("X: X%c\nTransfer-Encoding: chunked"%(i))
mutations["endspacerx-%02x"%i] = render_template("Transfer-Encoding: chunked\r%cX: X"%(i))
mutations["endspacexn-%02x"%i] = render_template("Transfer-Encoding: chunked%c\nX: X"%(i))

There are no input arguments yet on specifying your own customer headers and user-agents. It is recommended to create your own configuration file based on default.py and modify it to your liking.

Smuggler comes with 3 configuration files: default.py (fast), doubles.py (niche, slow), exhaustive.py (very slow) default.py is the fastest because it contains less mutations.

specify configuration files using the -c/--configfile <configfile> command line option


Payloads Directory

Inside the Smuggler directory is the payloads directory. When Smuggler finds a potential CLTE or TECL desync issue, it will automatically dump a binary txt file of the problematic payload in the payloads directory. All payload filenames are annotated with the hostname, desync type and mutation type. Use these payloads to netcat directly to the server or to import into other analysis tools.


Helper Scripts

After you find a desync issue feel free to use my Turbo Intruder desync scripts found Here: https://github.com/defparam/tiscripts DesyncAttack_CLTE.py and DesyncAttack_TECL.py are great scripts to help stage a desync attack


License

These scripts are released under the MIT license. See LICENSE.



Related word
  1. Hacking Tools 2019
  2. Hacking Tools Github
  3. Hacking Tools Software
  4. Hack Tools Online
  5. Tools For Hacker
  6. Hacker Tools 2020
  7. Hacker Tools Hardware
  8. Pentest Tools
  9. Hack Tools Pc
  10. Hack Tools Mac
  11. Hackers Toolbox
  12. Hacker Tools List
  13. How To Hack
  14. Pentest Tools Framework
  15. Hacks And Tools
  16. Blackhat Hacker Tools
  17. New Hack Tools
  18. Hacking Tools Hardware
  19. Hacking Tools For Beginners
  20. Hack Tool Apk No Root
  21. Hacking Tools Windows
  22. Easy Hack Tools
  23. How To Make Hacking Tools
  24. Pentest Tools Android
  25. Hacker Tools For Windows
  26. Pentest Tools Tcp Port Scanner
  27. Hacking Tools Online
  28. Pentest Tools Android
  29. Pentest Tools Download
  30. Pentest Tools For Android
  31. Nsa Hacker Tools
  32. Nsa Hacker Tools
  33. Hacker Security Tools
  34. Hacking Tools For Pc
  35. Hack Tools Github
  36. Hacker Tools Windows
  37. Pentest Tools
  38. Game Hacking
  39. Hacking Tools Kit
  40. Hacker Hardware Tools
  41. Hacking Tools 2019
  42. Pentest Tools Review
  43. Hacker Tools Free
  44. Hak5 Tools
  45. What Is Hacking Tools
  46. Hack Tools Online
  47. Best Pentesting Tools 2018
  48. New Hack Tools
  49. Hacking Tools Mac
  50. Pentest Tools Kali Linux
  51. Hacker Tools Apk
  52. Pentest Reporting Tools
  53. Hacker Hardware Tools
  54. Pentest Tools Website
  55. Hacking Tools Online
  56. Hacker Techniques Tools And Incident Handling
  57. Underground Hacker Sites
  58. Hacker Tools List
  59. Hacking Tools
  60. Hacker Tools Software
  61. Pentest Tools Nmap
  62. Hak5 Tools
  63. Hacking Tools
  64. Hacking Tools For Windows 7
  65. Hacking Tools Pc
  66. Hack Tools Mac
  67. Tools 4 Hack
  68. Pentest Tools Windows
  69. How To Hack
  70. Pentest Tools Find Subdomains
  71. Hackrf Tools
  72. Pentest Tools For Mac
  73. Hak5 Tools
  74. Hack Tools Online
  75. Hacker Tools Mac
  76. Hacker Tools Mac
  77. Pentest Tools List
  78. Github Hacking Tools
  79. Hacking Tools Free Download
  80. What Is Hacking Tools
  81. Growth Hacker Tools
  82. Hack Tools For Windows
  83. Hacker Tools
  84. Hack Apps
  85. World No 1 Hacker Software
  86. What Are Hacking Tools
  87. Hacker Tools Free
  88. Hacking Tools Name
  89. Pentest Tools Framework
  90. Growth Hacker Tools
  91. Hacker
  92. Hacker Tools Hardware
  93. Pentest Tools Linux
  94. Termux Hacking Tools 2019
  95. Hack Tool Apk No Root
  96. Hack Tools Online
  97. Pentest Tools Online
  98. Pentest Tools For Mac
  99. World No 1 Hacker Software
  100. Kik Hack Tools
  101. Hacking App
  102. Hack Tools
  103. Hacker Tools Windows
  104. Hacker Tool Kit

Blockchain Forensics R&D With Python - Tracking Attackers, Etherscan API Usage, Python Coding, Signature Lookups And Decompiling Bytecode

 Added a new playlist over the last few weeks, its up to about 8 videos now which starts out writing code to monitor attackers address changes on the blockchain followed by using EtherScan API's to track some movements and make sense of things with a few other learning points along the way...   

There is one pre-requisite video however which is where this series came from which is another video I created where we took apart a smart contract from a YouTube scam to find the attackers malicious code, so review that first below: 

Twitter: @ficti0n
Web: http://cclabs.io/


If you learn something from this blog/video consider sharing it on your social media or retweeting my posts.


Here is the Pre-Requisite Video to this series Which does a smart contract audit of a malicious front running bot: 



Here is the new playlist series which digs into tracking this attacker: 


Link to full Playlist since blogger is not letting me embed the playlist: 
https://www.youtube.com/playlist?list=PLCwnLq3tOElrUdIg4LgdhPhCKAiy7NZYA




Intro to the playlist: 


 

More info

  1. Hacking Tools For Kali Linux
  2. Pentest Tools Url Fuzzer
  3. Best Hacking Tools 2020
  4. Hacker Tools Software
  5. Hack Website Online Tool
  6. Pentest Tools Url Fuzzer
  7. Pentest Tools Url Fuzzer
  8. Best Hacking Tools 2020
  9. Hacker Tool Kit
  10. Ethical Hacker Tools
  11. Hack Tools Mac
  12. Nsa Hacker Tools
  13. Pentest Box Tools Download
  14. Tools 4 Hack
  15. Hacker Techniques Tools And Incident Handling
  16. Pentest Tools Apk
  17. Pentest Tools Alternative
  18. Hacking Tools For Mac
  19. Hack Tools 2019
  20. Hacker Tools For Windows
  21. Nsa Hack Tools
  22. Physical Pentest Tools
  23. Hacking Tools For Mac
  24. Hack Tools For Pc
  25. Underground Hacker Sites
  26. New Hack Tools
  27. Hacker Tools 2020
  28. Hack And Tools
  29. Usb Pentest Tools
  30. Hacker Search Tools
  31. Hacker Tools For Mac
  32. Black Hat Hacker Tools
  33. Hack Tools For Games
  34. Hack Rom Tools
  35. Pentest Automation Tools
  36. Hacker Tools Windows
  37. Hacker Tools Apk
  38. Hacking Tools For Windows 7
  39. Pentest Tools Port Scanner
  40. Hacking Tools Mac
  41. Pentest Tools Download
  42. Hacking Tools Usb
  43. Pentest Tools For Mac
  44. Hacker Tools For Mac
  45. Best Pentesting Tools 2018
  46. Hacking Tools Software
  47. Hack Tools For Mac
  48. Growth Hacker Tools
  49. Hack Tools Github
  50. Hacking Tools Kit
  51. Free Pentest Tools For Windows
  52. Hack Tools Download
  53. Pentest Tools Linux
  54. Tools 4 Hack
  55. Pentest Tools Android
  56. Hacking Tools For Games
  57. Hacker Tools Free
  58. Underground Hacker Sites
  59. Hacking Tools For Beginners
  60. Pentest Tools Online
  61. Hack Tool Apk No Root
  62. Hack And Tools
  63. Pentest Tools For Windows
  64. Kik Hack Tools
  65. Hacking Tools Software
  66. Pentest Tools
  67. Hack Tools Mac
  68. Android Hack Tools Github
  69. Hacking Tools Pc
  70. Usb Pentest Tools
  71. Hacker Tools Free Download
  72. Hacks And Tools
  73. Hak5 Tools
  74. Hacker Tools Free
  75. Hacking Tools Free Download
  76. Pentest Tools Online
  77. Pentest Tools For Mac
  78. Tools Used For Hacking
  79. Hacking Tools Free Download
  80. Hacker Tools Github
  81. Hacker Tools Windows
  82. Hack Website Online Tool
  83. Tools For Hacker
  84. Hack Rom Tools
  85. Pentest Tools Open Source
  86. Pentest Tools For Windows
  87. Hacking Tools 2020
  88. Pentest Tools Open Source
  89. Hack Tools For Pc
  90. Hacking Tools
  91. Pentest Tools For Mac
  92. Hacker Tools Hardware
  93. Hack Tools Pc
  94. Pentest Tools Kali Linux
  95. Hack Website Online Tool
  96. Hacking Tools Mac
  97. Hack Tool Apk
  98. Hacker Tools 2019
  99. Bluetooth Hacking Tools Kali
  100. Best Pentesting Tools 2018
  101. Hacking Tools For Beginners
  102. Hacker Tools Apk Download
  103. Hack Apps
  104. Game Hacking
  105. Hack Tool Apk
  106. Tools For Hacker
  107. Hacker Tools Apk Download
  108. Hacking Tools For Windows Free Download
  109. Tools Used For Hacking
  110. Hacking Tools For Windows Free Download
  111. Hack Tool Apk No Root
  112. New Hack Tools
  113. Best Hacking Tools 2019
  114. Hack Tools For Games
  115. Hacking Tools Kit
  116. Hacking Tools 2019
  117. Hack Tools
  118. Hacking Tools And Software
  119. Hacker Tools For Windows
  120. Hacker Tool Kit
  121. Pentest Tools Nmap
  122. Free Pentest Tools For Windows
  123. Hacker Tools Online
  124. Nsa Hacker Tools
  125. Pentest Tools Review
  126. How To Hack
  127. Hacker Tools
  128. Hacker Tools 2019
  129. Hacker Tools Online
  130. Underground Hacker Sites
  131. Pentest Tools For Mac
  132. Hacker Tools Hardware
  133. Hack Tools Mac
  134. Hacker Tools Software
  135. Hacker Techniques Tools And Incident Handling
  136. Hack Website Online Tool
  137. Hack Tools For Windows
  138. What Are Hacking Tools
  139. Hack Tool Apk
  140. Pentest Tools
  141. Pentest Tools For Mac
  142. Pentest Tools Android
  143. Hacking Tools For Windows Free Download
  144. Hacking Tools Kit
  145. Hacking Tools For Games
  146. Hacking Tools And Software
  147. Pentest Tools Port Scanner
  148. Growth Hacker Tools
  149. Pentest Tools Linux
  150. Hacker Tools Online
  151. Hack Tools Online
  152. What Are Hacking Tools
  153. Hacking Tools And Software
  154. Hack Tools For Windows
  155. Pentest Tools Subdomain
  156. Hacking Tools For Beginners
  157. Hack Tools For Ubuntu
  158. Hacking Tools Hardware
  159. Hacker Tools List
  160. Pentest Tools For Windows
  161. Hacker Tools Apk
  162. Underground Hacker Sites
  163. Easy Hack Tools
  164. Hacking Tools For Mac
  165. Black Hat Hacker Tools
  166. Hacker Tools Free
  167. Hak5 Tools
  168. Hacker Tools For Mac
  169. Hack Tools Online
  170. Hacking Tools Github
  171. Pentest Tools Nmap
  172. Pentest Tools Port Scanner
  173. Best Pentesting Tools 2018
  174. Pentest Tools
  175. Hack Rom Tools
  176. Pentest Tools Download
  177. Hacking Tools Name
  178. Easy Hack Tools

DSploit

DSploit

After playing with the applications installed on the Pwn Pad, I found that the most important application (at least for me) was missing from the pre-installed apps. Namely, DSploit. Although DSploit has tons of features, I really liked the multiprotocol password sniffing (same as dsniff) and the session hijacking functionality.

The DSploit APK in the Play Store was not working for me, but the latest nightly on http://dsploit.net worked like a charm.

Most features require that you and your target uses the same WiFi network, and that's it. It can be Open, WEP, WPA/WPA2 Personal. On all of these networks, DSploit will sniff the passwords - because of the active attacks. E.g. a lot of email clients still use IMAP with clear text passwords, or some webmails, etc. 

First, DSploit lists the AP and the known devices on the network. In this case, I chose one victim client.


In the following submenu, there are tons of options, but the best features are in the MITM section. 


Stealthiness warning: in some cases, I received the following popup on the victim Windows:


This is what we have under the MITM submenu:


Password sniffing

For example, let's start with the Password Sniffer. It is the same as EvilAP and DSniff in my previous post. With the same results for the popular Hungarian webmail with the default secure login checkbox turned off. Don't forget, this is not an Open WiFi network, but one with WPA2 protection!


Session hijack

Now let's assume that the victim is very security-aware and he checks the secure login checkbox. Another cause can be that the victim already logged in, long before we started to attack. The session hijacking function is similar to the Firesheep tool, but it works with every website where the session cookies are sent in clear text, and there is no need for any additional support.

In a session hijacking attack (also called "sidejacking"), after the victim browser sends the authentication cookies in clear text, DSploit copies these cookies into its own browser, and opens the website with the same cookies, which results in successful login most of the time. Let's see session hijacking in action!

Here, we can see that the session cookies have been sniffed from the air:


Let's select that session, and be amazed that we logged into the user's webmail session.




Redirect traffic

This feature can be used both for fun or profit. For fun, you can redirect all the victim traffic to http://www.kittenwar.com/. For-profit, you can redirect your victim to phishing pages.


Replace images, videos

I think this is just for fun here. Endless Rick Rolling possibilities.


Script injection

This is mostly for profit. client-side injection, drive-by-exploits, endless possibilities.

Custom filter

If you are familiar with ettercap, this has similar functionalities (but dumber), with string or regex replacements. E.g. you can replace the news, stock prices, which pizza the victim ordered, etc. If you know more fun stuff here, please leave a comment (only HTTP scenario - e.g. attacking Facebook won't work).

Additional fun (not in DSploit) - SSLStrip 

From the MITM section of DSploit, I really miss the SSLStrip functionality. Luckily, it is built into the Pwn Pad. With the help of SSLStrip, we can remove the references to HTTPS links in the clear text HTTP traffic, and replace those with HTTP. So even if the user checks the secure login checkbox at freemail.hu, the password will be sent in clear text - thus it can be sniffed with DSniff.

HTML source on the client-side without SSLstrip:


HTML source on the client-side with SSL strip:


With EvilAP, SSLStrip, and DSniff, the password can be stolen. No hacking skillz needed.

Lessons learned here

If you are a website operator where you allow your users to login, always:
  1. Use HTTPS with a trusted certificate, and redirect all unencrypted traffic to HTTPS ASAP
  2. Mark the session cookies with the secure flag
  3. Use HSTS to prevent SSLStrip attacks
If you are a user:
  1. Don't trust sites with your confidential data if the above points are not fixed. Choose a more secure alternative
  2. Use HTTPS everywhere plugin
  3. For improved security, use VPN
Because hacking has never been so easy before.
And last but not least, if you like the DSploit project, don't forget to donate them!
Related news

  1. Hack App
  2. Game Hacking
  3. Hacker Tools Hardware
  4. Hacker
  5. Usb Pentest Tools
  6. Pentest Tools For Windows
  7. Hacking Tools For Pc
  8. Pentest Automation Tools
  9. Hacking Tools For Windows Free Download
  10. Ethical Hacker Tools
  11. Pentest Tools Apk
  12. Black Hat Hacker Tools
  13. Hacking Tools For Pc
  14. Hack Apps
  15. Hack Tools
  16. Best Pentesting Tools 2018
  17. Pentest Tools Windows
  18. Hacking Tools Software
  19. How To Make Hacking Tools
  20. Ethical Hacker Tools
  21. Hacking App
  22. Hacks And Tools
  23. Tools For Hacker
  24. Tools For Hacker
  25. Easy Hack Tools
  26. Pentest Tools List
  27. Hack Tools For Mac
  28. Hacker Tool Kit
  29. Pentest Tools For Android
  30. Hacker Tools Hardware
  31. New Hacker Tools
  32. Pentest Tools Android
  33. Hack Tools Pc
  34. Hack Tools For Windows
  35. Hack Tools Github
  36. Pentest Tools Nmap
  37. Hack Tools 2019
  38. Hacking Tools Github
  39. Install Pentest Tools Ubuntu
  40. What Is Hacking Tools
  41. Hacker Tools For Mac
  42. Hacking Tools Github
  43. Hacking Tools Pc
  44. Hacking Tools Mac
  45. Hacking App
  46. How To Make Hacking Tools
  47. Tools For Hacker
  48. Pentest Tools For Android
  49. Hacker Tools Apk Download
  50. Hacker Tools Online
  51. Pentest Tools Tcp Port Scanner
  52. World No 1 Hacker Software
  53. Nsa Hacker Tools
  54. Hack Tools For Mac
  55. Easy Hack Tools
  56. Free Pentest Tools For Windows
  57. Hack Tools Mac
  58. Tools For Hacker
  59. Pentest Tools For Ubuntu
  60. Pentest Tools
  61. Hacker Tools 2019
  62. Hack Tools Github
  63. Ethical Hacker Tools