Thursday, January 18, 2024

CEH: System Hacking, Cracking A Password, Understanding The LAN Manager Hash, NetBIOS DoS Attacks


Passwords are the key element of information require to access the system. Similarly, the first step is to access the system is that you should know how to crack the password of the target system. There is a fact that users selects passwords that are easy to guess. Once a password is guessed or cracked, it can be the launching point for escalating privileges, executing applications, hiding files, and covering tracks. If guessing a password fails, then passwords may be cracked manually or with automated tools such as a dictionary or brute-force method.

Cracking a Password

Passwords are stored in the Security Accounts Manager (SAM) file on a Windows system and in a password shadow file on a Linux system.

Manual password cracking involves attempting to log on with different passwords. The hacker follows these steps:
  1. Find a valid user account (such as Administrator or Guest).
  2. Create a list of possible passwords.
  3. Rank the passwords from high to low probability.
  4. Key in each password.
  5. Try again until a successful password is found.
A hacker can also create a script file that tries each password in a list. This is still considered manual cracking, but it's time consuming and not usually effective.

A more efficient way of cracking a password is to gain access to the password file on a system. Most systems hash (one-way encrypt) a password for storage on a system. During the logon process, the password entered by the user is hashed using the same algorithm and then compared to the hashed passwords stored in the file. A hacker can attempt to gain access to the hashing algorithm stored on the server instead of trying to guess or otherwise identify the password. If the hacker is successful, they can decrypt the passwords stored on the server.

Understanding the LAN Manager Hash

Windows 2000 uses NT LAN Manager (NTLM) hashing to secure passwords in transit on the network. Depending on the password, NTLM hashing can be weak and easy to break. For example, let's say that the password is 123456abcdef . When this password is encrypted with the NTLM algorithm, it's first converted to all uppercase: 123456ABCDEF . The password is padded with null (blank) characters to make it 14 characters long: 123456ABCDEF__ . Before the password is encrypted, the 14-character string is split in half: 123456A and
BCDEF__ . Each string is individually encrypted, and the results are concatenated:

123456A = 6BF11E04AFAB197F
BCDEF__ = F1E9FFDCC75575B15

The hash is 6BF11E04AFAB197FF1E9FFDCC75575B15 .

Cracking Windows 2000 Passwords

The SAM file in Windows contains the usernames and hashed passwords. It's located in the Windows\system32\config directory. The file is locked when the operating system is running so that a hacker can't attempt to copy the file while the machine is booted to Windows.

One option for copying the SAM file is to boot to an alternate operating system such as DOS or Linux with a boot CD. Alternately, the file can be copied from the repair directory. If a system administrator uses the RDISK feature of Windows to back up the system, then a compressed copy of the SAM file called SAM._ is created in C:\windows\repair . To expand this file, use the following command at the command prompt:

C:\>expand sam._ sam

After the file is uncompressed, a dictionary, hybrid, or brute-force attack can be run against the SAM file using a tool like L0phtCrack. A similar tool to L0phtcrack is Ophcrack.

Download and install ophcrack from http://ophcrack.sourceforge.net/

Redirecting the SMB Logon to the Attacker

Another way to discover passwords on a network is to redirect the Server Message Block (SMB) logon to an attacker's computer so that the passwords are sent to the hacker. In order to do this, the hacker must sniff the NTLM responses from the authentication server and trick the victim into attempting Windows authentication with the attacker's computer.

A common technique is to send the victim an email message with an embedded link to a fraudulent SMB server. When the link is clicked, the user unwittingly sends their credentials over the network.

SMBRelay

An SMB server that captures usernames and password hashes from incoming
SMB traffic. SMBRelay can also perform man-in-the-middle (MITM) attacks.

SMBRelay2

Similar to SMBRelay but uses NetBIOS names instead of IP addresses to capture usernames and passwords.

pwdump2

A program that extracts the password hashes from a SAM file on a Windows system. The extracted password hashes can then be run through L0phtCrack to break the passwords.

Samdump

Another program that extracts NTLM hashed passwords from a SAM file.

C2MYAZZ

A spyware program that makes Windows clients send their passwords as clear text. It displays usernames and their passwords as users attach to server resources.

NetBIOS DoS Attacks

A NetBIOS denial-of-service (DoS) attack sends a NetBIOS Name Release message to the NetBIOS Name Service on a target Windows systems and forces the system to place its name in conflict so that the name can no longer be used. This essentially blocks the client from participating in the NetBIOS network and creates a network DoS for that system.
  1. Start with a memorable phrase, such as "Maryhadalittlelamb"
  2. Change every other character to uppercase, resulting in "MaRyHaDaLiTtLeLaMb"
  3. Change a to @ and i to 1 to yield "M@RyH@D@L1TtLeL@Mb"
  4. Drop every other pair to result in a secure repeatable password or "M@H@L1LeMb"

Now you have a password that meets all the requirements, yet can be "remade" if necessary.

More articles


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

Shadow Attacks … The Smallest Attack Vector Ever

In July 2020, we introduced a novel attack class called Shadow Attacks. In our recent research, we discovered a new variant of the attack which relies only on an Incremental Update containing a malicious trailer.
A proof-of-concept exploit working on Foxit (Version: 11.0.1.49938) can be downloaded here.

The story so far ...

Shadow attacks are attacks bypassing the integrity protection of digitally signed PDF documents. The attacks abuse two legitimate features in PDF documents which we briefly explain.

Hiding Content

In PDFs, there are multiple techniques to hide content that is not displayed when the document is opened. We, as attackers, usually hide malicious objects without referencing them in the xref section.

Incremental Updates

New content can be appended to a signed PDF document. This is quite dangerous though. The digital signature in PDFs protects a specific range of bytes. Any appended content does not break the signature verification since it is outside this range. As a result, any new Incremental Update does not violate the cryptographic verification of the digital signature. 
But, Incremental Updates are quite dangerous since they may completely change the displayed content of the document. In 2019, we showed different techniques based on Incremental Updates – the Incremental Saving Attacks.
As a countermeasure, most vendors warn if additional content is added after signing the document. BUT … not always!!!
 
There are meaningful use cases where Incremental Updates in digitally signed documents are allowed. For instance, contracts should be signed by multiple parties and each new signature is applied via additional Incremental Update.
Also, PAdES defines Incremental Updates as part of the long-term validation of digitally signed PDFs.
In summary, Incremental Updates are painful from a security perspective. Currently, vendors are trying to estimate whether an Incremental Update is malicious or not by analyzing its content.

Shadow Attacks

Shadow attacks, in general, deceive the PDF applications that an Incremental Update is not malicious. This can be done by providing an Incremental Update with minimal content.
In 2020, we estimated that appending an xref section and a trailer is sufficient to bypass the detection mechanisms of popular applications such as Adobe Reader and Foxit Reader.

Trailer-based Shadow Attack

Three months ago, we tried to reduce the content of the malicious Incremental Update. Our idea was to use only a malicious trailer and still change the content of the entire document when it is opened. Let's see how this can be done. 


The Signer's view on the document

 If a signer gets the document depicted on the left side, he or she sees the content "Sign the document to get a reward".
The document contains a hidden content depicted as red text – the 4 0 obj containing the text "You are fired. Get out immediately" and an xref section pointing to that object. However, the trailer references another xref section, see (1) and (2). Thus, the red text is never shown.
From the signer's perspective, there is no possibility to detect the hidden content by opening and reviewing the document.
As a result, the signer, for example the company director, signs the document.

The Victim's view on the document

We assume that the attacker receives the signed document and manipulates it.
The attacker appends only a trailer that points to the hidden malicious xref section (the red one). When the victim opens the document, the content "You are fired. Get out immediately" is shown.
However, the digital signature validation does not throw any warning since … well … what could go wrong if only a trailer is appended.
 

Honest vs. Malicious Trailer

There are small differences between the honest and the malicious trailer– the byte position of the xref section. Now, the trailer points to the hidden xref section.
trailer
<<
/Size 23
/Prev 18735
/Root 13 0 R
]>>
Honest trailer
trailer
<<
/Size 23
/Prev 19192
/Root 13 0 R
]>>
Malicious trailer
 
 



Impact and Exploit

We successfully applied the new attack on Foxit Reader (Version: 11.0.1.49938). We promptly reported the vulnerability and provided a Proof-of-Concept (PoC) exploit, known as CVE-2021-40326.
Foxit acknowledged the attack and published a security fix with the new version Foxit Reader 11.1.
 
We are not aware of any further implementations vulnerable to this attack.
If you think that your application might be vulnerable to the attack, then just download the exploit and test on your own.
 

Authors of this post

Vladislav Mladenov

Simon Rohlmann

Christian Mainka

More information


  1. Hacker Tools Apk
  2. Github Hacking Tools
  3. How To Hack
  4. Underground Hacker Sites
  5. Hack Tools
  6. Hack And Tools
  7. Best Hacking Tools 2019
  8. Nsa Hack Tools
  9. Kik Hack Tools
  10. Best Pentesting Tools 2018
  11. Hacking Tools For Mac
  12. Pentest Tools Github
  13. Install Pentest Tools Ubuntu
  14. Hack Tools 2019
  15. Hacking Tools For Beginners
  16. Hacking Tools For Windows 7
  17. Wifi Hacker Tools For Windows
  18. Hacking Tools And Software
  19. Blackhat Hacker Tools
  20. Hacking Tools For Kali Linux
  21. Pentest Recon Tools
  22. Hacking Tools Online
  23. Hack Tools Github
  24. Pentest Tools Review
  25. Hack Tools Mac
  26. Beginner Hacker Tools
  27. Hacking Tools Usb
  28. Hacker
  29. Hacker Tools Linux
  30. Tools Used For Hacking
  31. Hacker Tools For Pc
  32. Pentest Tools Linux
  33. Computer Hacker
  34. Hacking Tools For Kali Linux
  35. Pentest Tools For Mac
  36. Kik Hack Tools
  37. Hack Tools Download
  38. Pentest Reporting Tools
  39. Hack Tools Online
  40. How To Hack
  41. Blackhat Hacker Tools
  42. Pentest Tools Windows
  43. Hacking Tools Usb
  44. Hacking Tools For Windows Free Download
  45. Hacking Tools For Windows Free Download
  46. New Hack Tools
  47. Hacking Tools For Pc
  48. Beginner Hacker Tools
  49. Hack Tools Github
  50. Best Hacking Tools 2019
  51. Hacker Tools Online
  52. How To Make Hacking Tools
  53. Pentest Tools For Ubuntu
  54. Hacking Tools For Windows
  55. Hacking Tools Windows
  56. Hacker Tools Software
  57. Pentest Tools For Mac
  58. Hacking Tools For Windows
  59. Hacking Tools Name
  60. Hacking Tools For Windows Free Download
  61. Hacker Tools For Mac
  62. Pentest Tools Subdomain
  63. Pentest Tools Bluekeep
  64. Install Pentest Tools Ubuntu
  65. Pentest Tools Linux
  66. Pentest Tools Kali Linux
  67. New Hack Tools
  68. Hacking Tools And Software
  69. Physical Pentest Tools
  70. Pentest Recon Tools
  71. Hacker Hardware Tools
  72. Hacker Tools 2019
  73. How To Make Hacking Tools
  74. Pentest Tools For Mac
  75. Pentest Recon Tools
  76. Hacker Tools 2019
  77. Hack Tools Github
  78. Ethical Hacker Tools
  79. Pentest Tools For Android
  80. Hacking Tools 2020
  81. Hak5 Tools
  82. Hacking App
  83. Hackers Toolbox
  84. Pentest Tools Windows
  85. Hacker Tools
  86. Wifi Hacker Tools For Windows
  87. Hacking Tools Name
  88. Pentest Tools For Mac
  89. Hacking Tools For Mac
  90. Hacker Tools Hardware
  91. Tools 4 Hack
  92. Hacker Tools List
  93. Hacker Tools Apk
  94. Pentest Tools For Mac
  95. Physical Pentest Tools
  96. Hack Rom Tools
  97. Hacking Tools Online
  98. Hacking Tools 2019
  99. Pentest Tools Online
  100. Hack Tools For Games
  101. Hacking Tools Download

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: 


 

Related links


  1. Tools Used For Hacking
  2. Hacking Tools Name
  3. Nsa Hack Tools
  4. Hack Tool Apk No Root
  5. Growth Hacker Tools
  6. Hacker Tools For Windows
  7. Hackers Toolbox
  8. Hack App
  9. Hack Tools Mac
  10. Pentest Box Tools Download
  11. Tools 4 Hack
  12. Pentest Tools For Windows
  13. Hacking Tools 2020
  14. Computer Hacker
  15. Hack App
  16. Pentest Tools Tcp Port Scanner
  17. Hacking Tools Kit
  18. Pentest Tools
  19. Hack Tools 2019
  20. Pentest Tools Github
  21. Pentest Tools For Mac
  22. Hacker Security Tools
  23. Hacking Tools Online
  24. Hacking Tools Hardware
  25. Best Hacking Tools 2020
  26. Hacker Tools Free
  27. Hack Rom Tools
  28. New Hack Tools
  29. Hacker Tools Software
  30. Hacker Tools Apk Download
  31. Hacker
  32. Pentest Tools Github
  33. Pentest Tools Alternative
  34. Hacking Tools For Windows
  35. Pentest Tools Find Subdomains
  36. Pentest Tools Kali Linux
  37. Tools For Hacker
  38. Hacking Tools For Mac
  39. Pentest Tools Android
  40. Hacking Tools For Games
  41. Hacker Tools For Windows
  42. Hacking Apps
  43. Hack Tools For Ubuntu
  44. Hacker Tools For Mac
  45. Hacker Tools Linux
  46. Nsa Hack Tools
  47. Hacker
  48. Hack App
  49. Hack Tools For Games
  50. Pentest Tools For Ubuntu
  51. Pentest Tools Free
  52. Pentest Tools Framework
  53. Hacker Tools Mac
  54. Hacker Tool Kit
  55. Hacker Tools Free Download
  56. Hacking Tools And Software
  57. Hacking Tools Usb
  58. Hacker Tools Free Download
  59. Pentest Automation Tools
  60. Beginner Hacker Tools
  61. Black Hat Hacker Tools
  62. Github Hacking Tools
  63. Wifi Hacker Tools For Windows
  64. Hacker Tool Kit
  65. Free Pentest Tools For Windows
  66. Pentest Box Tools Download
  67. Hacker Tools 2020
  68. Hacker Tools For Mac
  69. Hacking App
  70. Hacker Tools For Pc
  71. Termux Hacking Tools 2019
  72. Pentest Tools Nmap
  73. Hacker Tools Github
  74. Hackers Toolbox
  75. Hacker Tools Hardware
  76. Kik Hack Tools
  77. Hacker Tools Online
  78. New Hacker Tools
  79. Pentest Tools Linux
  80. Top Pentest Tools
  81. Pentest Tools Kali Linux
  82. World No 1 Hacker Software
  83. Android Hack Tools Github
  84. Hacking Tools Download
  85. Pentest Tools Bluekeep
  86. Hacking Tools Github
  87. Hacking Apps
  88. Hackers Toolbox
  89. Hacking Tools Online
  90. Hack Tools Download
  91. Pentest Tools Port Scanner
  92. Pentest Tools
  93. Hacker Tools Linux
  94. Hack Tool Apk

Wednesday, January 17, 2024

Scanning For Padding Oracles

As you might have heard, we recently got our paper on padding oracle attacks accepted to the USENIX Security Conference. In this paper, we describe and evaluate a scanning methodology with which we found several padding oracle vulnerabilities in devices from various vendors. In total, we found that 1.83% of the Alexa Top 1 Million have padding oracle vulnerabilities.

To test whether a server is vulnerable, we specified different padding oracle vectors which we send to the system under test, using different cipher suites and protocol versions. If the server does not behave identically (on both the TLS and TCP layers), we consider it to be vulnerable to a padding oracle attack, since it is leaking information about the plaintext via behavior differences. Depending on the responses to such padding oracle vectors, one can estimate which implementation is responsible for the vulnerability. We contacted quite a few website owners and tried to cooperate with them, to find out which vendors and TLS stacks are responsible for the identified vulnerabilities. You can find our current disclosure status on this issue on https://github.com/RUB-NDS/TLS-Padding-Oracles.
We are currently in contact with other vendors to fix the remaining vulnerabilities, but the some of the rare (in terms of the number of affected hosts) vulnerabilities are currently not attributed. To fix the remaining vulnerabilities, we ask for your assistance to help get rid of this issue. For this purpose, we integrated a standalone version of our padding oracle evaluation tool into our TLS-Scanner (v.2.7) project. This tool allows you (among other things) to evaluate if a specific server is vulnerable.

When the tool detects a vulnerability, it tries to attribute the vulnerability to a specific vendor or CVE. If we already know of the vulnerability of the server you scanned, the tool will print its details. If the tool does not have a description of the vulnerability in its database, it will ask you to notify us about the vulnerable server, such that we can notify the vendor and get the device fixed. To be clear: the tool never sends any data to us - you have the choice of whether to notify us (and what details to include). There is a chance that the tool's attribution is also mistaken, that is, the tool lists a vendor for your host, but you know for sure that you do not use an implementation by this vendor. Please contact us in such cases as well.

How to use the Tool

First, you need to grab hold of the tool. There are 3 ways to get your hands dirty: pre-compiled, self-compiled or Docker. We provide a pre-compiled version of the tool since the compilation process can get quite messy if you are not familiar with java and maven. You can directly download the resulting project here. However, if you also want to play around with the code, you have to compile everything yourself.

Building the TLS-Scanner

For this, you will need (Git), maven (sudo apt-get install maven), OpenJDK-8  (I can guarantee that this version works, other versions might work as well, have not tested it).

You will need to get TLS-Attacker 2.9 (if you do not already have it):
Now we can clone and install the TLS-Scanner

Docker

We also provide a Dockerfile, which lets you run the scanner directly

Getting Started


If you start the TLS-Scanner you should be greeted by a usage info, similar to the one below:

 or


This should give you an overview of the supported command line flags. The only really required one is the -connect flag (similar to OpenSSL and TLS-Attacker), with which you specify which host to scan. The most basic command is therefore:

Your output may look something like this:

By default, TLS-Scanner will run single-threaded. In such cases the scanning will take a while; just how long it will take depends on your server configuration. The scanner also supports multi-threading, which drastically improves the performance. There are two parameters to play around with, -threads, which controls how many different "probes" are executed in parallel, and -aggressive , which controls how many handshakes can be executed simultaneously. If you want the fastest results the following parameters are usually a good choice:

But lets get back to the results of the Scanner. Currently the Scanner supports a bunch of well known tests, like supported ciphersuites or protocol versions. These are very similar to what you may be used to from other scanners like ssllabs or testssl.sh.

Padding Oracles

The main advantage of our scanner is the ability to scan for padding oracle vulnerabilities (which is probably why you are reading this post). You will see if you are vulnerable in the "Attack Vulnerabilities" section. For example, when scanning hackmanit.de, the result is false. Good for us! But as you might have seen there is also another section in the scanner report:"PaddingOracle Responsemap"
This section lists the responses of the scanned host for each padding oracle vector, for each cipher suite and protocol version. For hackmanit.de, there is no detected difference in responses, which means hackmanit.de is not vulnerable to the attack:
If we want, we can also look at the concrete responses of the server. For this purpose, we start the scanner with the -reportDetail flag:

With this flag we now get the following details:

So what does this all mean? First of all, we named our malformed records. The interpretation of those names is visualized in the following table:
BasicMac-<position>-<XOR>   A Record with ApplicationData, MAC and padding bytes, where the padding byte at <position> is XOR'd <XOR>
 MissingMacByteFirst  A Record without ApplicationData, where the first byte of the MAC is missing
 MissingMacByteLast  A Record without ApplicationData, where the last byte of the MAC is missing
 Plain FF  A Record without ApplicationData & MAC which only contains Paddingbytes: 64* 0xFF 
 Plain 3F  A Record without ApplicationData & MAC which only contains Paddingbytes: 64* 0xF3
 InvPadValMac-[<position>]-<appDataLength>-<paddingBytes>  A Record with invalid padding and valid MAC. The Record contains <appDataLength> many ApplicationData bytes and <paddingBytes> many PaddingBytes. The Padding is invalid at <position>.
 ValPadInvMac-[<position>]-<appDataLength>-<paddingBytes>  A Record with valid padding and invalid MAC. The Record contains <appDataLength> many ApplicationData bytes and <paddingBytes> many PaddingBytes. The MAC is invalid at <position>.
 InvPadInvMac-[<position>]-<appDataLength>-<paddingBytes>  A Record with invalid padding and invalid MAC. The Record contains <appDataLength> many ApplicationData bytes and <paddingBytes> many PaddingBytes. The MAC is invalid at the first position. The Padding is invalid at <position>.

Next to the name you can see what the actual response from the server was. Alert messages which are in [] brackets indicate that the alert was a fatal alert while () brackets indicate a warning alert. ENC means that the messages were encrypted (which is not always the case). The last symbol in each line indicates the state of the socket. An X represents a closed socket with a TCP FIN, a T indicates that the socket was still open at the time of measurement and an @ indicates that the socket was closed with an RST. So how did Hackmanit respond? We see a [BAD_RECORD_MAC]  ENC X, which means we received an ENCrypted FATAL BAD_RECORD_MAC alert, and the TCP connection was closed with a TCP FIN. If a server appears to be vulnerable, the scanner will execute the scan a total of three times to confirm the vulnerability. Since this response is identical to all our vectors, we know that the server was not vulnerable and the scanner is not re-executing the workflows.

Here is an example of a vulnerable host:
As you can see, this time the workflows got executed multiple times, and the scanner reports the cipher suite and version as vulnerable because of "SOCKET_STATE". This means that in some cases the socket state revealed information about the plaintext. If you look closely, you can see that for ValPadInvMac-[0]-0-59, ValPadInvMac-[8]-0-59 and ValPadInvMac-[15]-0-59 the server failed to close the TCP socket, while for all other vectors the TCP connect was closed with a TCP FIN. The server was therefore vulnerable.

Since the server was vulnerable, TLS-Scanner will also print an additional section: "PaddingOracle Details"

In this section we try to identify the vulnerability. In the example above, TLS-Scanner will print the following:

As you can see, we attribute this vulnerability to OpenSSL <1.0.2r. We do so by looking at the exact responses to our malformed records. We additionally print two important facts about the vulnerability: Whether it is observable and its strength. The precise details of these properties are beyond the scope of this blogpost, but the short version is:
If an oracle is observable, a man in the middle attacker can see the differences between the vectors by passively observing the traffic, without relying on browser or application specific tricks. A strong oracle has no limitations in the number of consecutive bytes an attacker can decrypt. If an oracle is STRONG and OBSERVABLE, then an attacker can realistically exploit it. This is the case in the example above.
For more details on this, you will have to wait for the paper.

Attribution

As you can see, we try to fingerprint the responsible device/implementation. However, we were not able to identify all vulnerable implementations yet. If we cannot attribute a vulnerability you will receive the following message:

Could not identify the vulnerability. Please contact us if you know which software/hardware is generating this behavior.

If you encounter this message, we do not know yet who is responsible for this padding oracle and would be happy to know which device/vendor is responsible. If you know who is, please contact us so that we can get in contact with the vendor to fix the issue. To reiterate, the tool never sends any data back to us, and it is your choice whether to contact us manually or not.

There are also some cases in which we can identify the vendor, but the vendor has not patched the vulnerability yet. If you encounter such a host, the scanner will tell you that we know the responsible vendor. To prevent abuse, we do not include further details.

Non-Determinism and Errors

In some cases, the scanner is unable to scan for padding oracles and reports ERROR or non-deterministic responses. The ERROR cases appear if the scanner failed could not handshake with the specified cipher suite and protocol version. This might be due to a bug in the tested TLS-Server or a bug in TLS-Attacker or TLS-Scanner. If you think the handshake fails because of an issue on our side, please open an issue on Github, and we will investigate. The more interesting cases are the non-deterministic ones. In such cases the scanner observed non-identical scan results in three separate scans. This can be due to non-determinism in the software, connection errors, server load or non-homogeneous load balancing. Currently, you will have to analyze these cases manually. In the paper, we excluded such hosts from our study because we did not want to artificially improve our results. But we understand that you as a tester want to know if the server is vulnerable or not. If the server is not truly vulnerable you would see the differences between the answers spread across all the different vectors. If the differences only appear on a subset of malformed records the server is very likely vulnerable. If you are unsure, you can also always scan multiple times (or scan slowly), increase the timeout, or if you are entirely lost get in touch with us. 


How YOU can help

Please use the scanner on all your hosts and check for padding oracle vulnerabilities. If the scanner can identify your vulnerability, a patch should already be available. Please patch your system! If the scanner does not identify the vulnerability (and instructs you to contact us), please contact us with the details (robert.merget@rub.de). If you can provide us with the detailed output of the scanner or even better, the name of the host, with the corresponding vendor, we could match the results with our database and help fix the issue. We can already attribute over 90% of the vulnerabilities, but there is still a lot to be discovered. We mostly scanned the Alexa top 1-million on port 443. Other protocols like IMAPS, POP3S, etc. might have different implementations with different vulnerabilities. If you find vulnerabilities with our tool, please give us credit. It helps us to get more funding for our project.

Issues with the Scanner


A notable feature of our scanner is that we do not actively try to avoid intolerances (like not scanning with a lot of cipher suites in the Hello messages etc.). We believe that doing so would hide important bugs. We are currently experimenting with intolerances checks, but the feature is now still in beta. If we cannot scan a server (most of the time due to intolerances or SNI problems), the scanner will report a lot of intolerances and usually no supported protocol versions. Some intolerances may trick the scanner into reporting false results. At the current stage, we cannot make any guarantees. If you are using this tool during a pentest, it might be smart to rescan with other scanners (like the recently released padcheck tool from our colleague Craig Young) to find the ground truth (this is good advice in general, since other mainstream scanners likely have the same issues). Note however that it is very unlikely that the scanner reports a false positive on a padding oracle scan.


Conclusion

There are still a lot of padding oracle vulnerabilities out there - and a lot of them are still unpatched. We hope you will find some bugs with the tool :) Happy H4cking :D


Acknowlegements

This is joint work from Robert Merget (@ic0nz1), Juraj Somorovsky (@jurajsomorovsky),  Nimrod Aviram (@NimrodAviram), Janis Fliegenschmidt (@JanisFliegens), Craig Young (@craigtweets), Jörg Schwenk (@JoergSchwenk) and (Yuval Shavitt).

Related articles