Search This Blog

Sunday, August 30, 2020

Practical Dictionary Attack On IPsec IKE

We found out that in contrast to public knowledge, the Pre-Shared Key (PSK) authentication method in main mode of IKEv1 is susceptible to offline dictionary attacks. This requires only a single active Man-in-the-Middle attack. Thus, if low entropy passwords are used as PSKs, this can easily be broken.

This week at the USENIX Security conference, Dennis Felsch will present our research paper on IPsec attacksThe Dangers of Key Reuse: Practical Attacks on IPsec IKE. [alternative link to the paper]

In his blog post, Dennis showed how to attack the public key encryption based authentication methods of IKEv1 (PKE & RPKE) and how to use this attack against IKEv2 signature based authentication method. In this blog post, I will focus on another interesting finding regarding IKEv1 and the Pre-Shared Key authentication.

IPsec and Internet Key Exchange (IKE)

IPsec enables cryptographic protection of IP packets. It is commonly used to build VPNs (Virtual Private Networks). For key establishment, the IKE protocol is used. IKE exists in two versions, each with different modes, different phases, several authentication methods, and configuration options. Therefore, IKE is one of the most complex cryptographic protocols in use.

In version 1 of IKE (IKEv1), four authentication methods are available for Phase 1, in which initial authenticated keying material is established: Two public key encryption based methods, one signature based method, and a PSK (Pre-Shared Key) based method.

The relationship between IKEv1 Phase 1, Phase 2, and IPsec ESP. Multiple simultaneous Phase 2 connections can be established from a single Phase 1 connection. Grey parts are encrypted, either with IKE derived keys (light grey) or with IPsec keys (dark grey). The numbers at the curly brackets denote the number of messages to be exchanged in the protocol.

Pre-Shared Key authentication

As shown above, Pre-Shared Key authentication is one of three authentication methods in IKEv1. The authentication is based on the knowledge of a shared secret string. In reality, this is probably some sort of password.

The IKEv1 handshake for PSK authentication looks like the following (simplified version):


In the first two messages, the session identifier (inside HDR) and the cryptographic algorithms (proposals) are selected by initiator and responder. 

In messages 3 and 4, they exchange ephemeral Diffie-Hellman shares and nonces. After that, they compute a key k by using their shared secret (PSK) in a PRF function (e.g. HMAC-SHA1) and the previously exchanged nonces. This key is used to derive additional keys (ka, kd, ke). The key kd is used to compute MACI over the session identifier and the shared diffie-hellman secret gxy. Finally, the key ke is used to encrypt IDI (e.g. IPv4 address of the peer) and MACI

Weaknesses of PSK authentication

It is well known that the aggressive mode of authentication in combination with PSK is insecure and vulnerable against off-line dictionary attacks, by simply eavesedropping the packets. For example, in strongSwan it is necessary to set the following configuration flag in order to use it:
charon.i_dont_care_about_security_and_use_aggressive_mode_psk=yes

For the main mode, we found a similar attack when doing some minor additional work. For that, the attacker needs to waits until a peer A (initiator) tries to connect to another peer B (responder). Then, the attacker acts as a man-in-the middle and behaves like the peer B would, but does not forward the packets to B.

From the picture above it should be clear that an attacker who acts as B can compute (gxy) and receives the necessary public values session ID, nI, nR. However, the attacker does not know the PSK. In order to mount a dictionary attack against this value, he uses the nonces, and computes a candidate for for every entry in the dictionary. It is necessary to make a key derivation for every k with the values of the session identifiers and shared Diffie-Hellmann secret the possible keys ka, kd and ke. Then, the attacker uses ke in order to decrypt the encrypted part of message 5. Due to IDI often being an IP address plus some additional data of the initiator, the attacker can easily determine if the correct PSK has been found.

Who is affected?

This weakness exists in the IKEv1 standard (RFC 2409). Every software or hardware that is compliant to this standard is affected. Therefore, we encourage all vendors, companies, and developers to at least ensure that high-entropy Pre-Shared Keys are used in IKEv1 configurations.

In order to verify the attack, we tested the attack against strongSWAN 5.5.1.

Proof-of-Concept

We have implemented a PoC that runs a dictionary attack against a network capture (pcapng) of a IKEv1 main mode session. As input, it also requires the Diffie-Hellmann secret as described above. You can find the source code at github. We only tested the attack against strongSWAN 5.5.1. If you want to use the PoC against another implementation or session, you have to adjust the idHex value in main.py.

Responsible Disclosure

We reported our findings to the international CERT at July 6th, 2018. We were informed that they contacted over 250 parties about the weakness. The CVE ID for it is CVE-2018-5389 [cert entry].

Credits

On August 10th, 2018, we learned that this attack against IKEv1 main mode with PSKs was previously described by David McGrew in his blog post Great Cipher, But Where Did You Get That Key?. We would like to point out that neither we nor the USENIX reviewers nor the CERT were obviously aware of this.
On August 14th 2018, Graham Bartlett (Cisco) email us that he presented the weakness of PSK in IKEv2 in several public presentations and in his book.
On August 15th 2018, we were informed by Tamir Zegman that John Pliam described the attack on his web page in 1999.

FAQs

  • Do you have a name, logo, any merchandising for the attack?
    No.
  • Have I been attacked?
    We mentioned above that such an attack would require an active man-in-the-middle attack. In the logs this could look like a failed connection attempt or a session timed out. But this is a rather weak indication and no evidence for an attack. 
  • What should I do?
    If you do not have the option to switch to authentication with digital signatures, choose a Pre-Shared Key that resists dictionary attacks. If you want to achieve e.g. 128 bits of security, configure a PSK with at least 19 random ASCII characters. And do not use something that can be found in public databases.
  • Am I safe if I use PSKs with IKEv2?
    No, interestingly the standard also mentions that IKEv2 does not prevent against off-line dictionary attacks.
  • Where can I learn more?
    You can read the paper[alternative link to the paper]
  • What else does the paper contain?
    The paper contains a lot more details than this blogpost. It explains all authentication methods of IKEv1 and it gives message flow diagrams of the protocol. There, we describe a variant of the attack that uses the Bleichenbacher oracles to forge signatures to target IKEv2. 
Related articles
  1. Pentest Recon Tools
  2. Pentest Tools List
  3. Pentest Automation Tools
  4. Top Pentest Tools
  5. Hack Tools
  6. Hacking Tools And Software
  7. Hacker
  8. Hacker Techniques Tools And Incident Handling
  9. Hack Tools Mac
  10. Hackers Toolbox
  11. Top Pentest Tools
  12. Pentest Tools Subdomain
  13. Hacker
  14. Pentest Tools Online
  15. Hacking Tools For Windows
  16. Hack Tools Online
  17. Best Hacking Tools 2020
  18. Pentest Tools For Android
  19. Pentest Tools For Windows
  20. Hacking Tools Online
  21. Hack Tools Pc
  22. Hacker Tools For Windows
  23. Hacking Tools Mac
  24. Hack Tools For Windows
  25. Hack Tool Apk No Root
  26. How To Hack
  27. Hack Tool Apk
  28. Hacking Tools Pc
  29. Pentest Tools List
  30. Pentest Recon Tools
  31. Hacking Tools Hardware
  32. Hacker Security Tools
  33. Hacking Tools Hardware
  34. Hacking Tools 2019
  35. Pentest Reporting Tools
  36. Pentest Tools For Ubuntu
  37. Hacker Tools 2020
  38. Hacking Tools Windows
  39. Ethical Hacker Tools
  40. Hacking Tools Pc
  41. Hacker Techniques Tools And Incident Handling
  42. Underground Hacker Sites
  43. What Is Hacking Tools
  44. Hacking Tools For Games
  45. Pentest Box Tools Download
  46. Free Pentest Tools For Windows
  47. Physical Pentest Tools
  48. Pentest Tools Github
  49. Pentest Tools Linux
  50. Hack Tools For Ubuntu
  51. Hack Tools 2019
  52. Hacking Tools Kit
  53. Hack Tools
  54. Install Pentest Tools Ubuntu
  55. Pentest Tools List
  56. Hack Tools
  57. Beginner Hacker Tools
  58. Hacking Tools And Software
  59. Hack Tools Pc
  60. Hack Tools For Windows
  61. Hack Tools Pc
  62. Pentest Tools Free
  63. Hack Apps
  64. Hak5 Tools
  65. Top Pentest Tools
  66. Hacker Hardware Tools
  67. Bluetooth Hacking Tools Kali
  68. Hacker Tools For Pc
  69. Hacking Apps
  70. Hack Tools For Games
  71. World No 1 Hacker Software
  72. Hak5 Tools
  73. Bluetooth Hacking Tools Kali
  74. How To Hack
  75. Pentest Tools
  76. Hacker Tools 2020
  77. Beginner Hacker Tools
  78. Pentest Tools Review
  79. Pentest Box Tools Download
  80. Pentest Tools Website Vulnerability
  81. Hack Tools For Mac
  82. Blackhat Hacker Tools
  83. Hack Tools Download
  84. Hacker Techniques Tools And Incident Handling
  85. How To Install Pentest Tools In Ubuntu
  86. What Are Hacking Tools
  87. Pentest Recon Tools
  88. Pentest Tools Windows
  89. Nsa Hacker Tools
  90. Ethical Hacker Tools
  91. Growth Hacker Tools
  92. Pentest Tools Android
  93. Hacker Tools For Pc
  94. Hacking Tools For Pc
  95. Hacker Tools Apk Download
  96. Hack And Tools

CEH: Fundamentals Of Social Engineering


Social engineering is a nontechnical method of breaking into a system or network. It's the process of deceiving users of a system and convincing them to perform acts useful to the hacker, such as giving out information that can be used to defeat or bypass security mechanisms. Social engineering is important to understand because hackers can use it to attack the human element of a system and circumvent technical security measures. This method can be used to gather information before or during an attack.

A social engineer commonly uses the telephone or Internet to trick people into revealing sensitive information or to get them to do something that is against the security policies of the organization. By this method, social engineers exploit the natural tendency of a person to trust their word, rather than exploiting computer security holes. It's generally agreed that users are the weak link in security; this principle is what makes social engineering possible.

The most dangerous part of social engineering is that companies with authentication processes, firewalls, virtual private networks, and network monitoring software are still wide open to attacks, because social engineering doesn't assault the security measures directly. Instead, a social-engineering attack bypasses the security measures and goes after the human element in an organization.

Types of Social Engineering-Attacks

There are two types of Social Engineering attacks

Human-Based 

Human-based social engineering refers to person-to-person interaction to retrieve the desired information. An example is calling the help desk and trying to find out a password.

Computer-Based 

​Computer-based social engineering refers to having computer software that attempts to retrieve the desired information. An example is sending a user an email and asking them to reenter a password in a web page to confirm it. This social-engineering attack is also known as phishing.

Human-Based Social Engineering

Human-Based further categorized as follow:

Impersonating an Employee or Valid User

In this type of social-engineering attack, the hacker pretends to be an employee or valid user on the system. A hacker can gain physical access by pretending to be a janitor, employee, or contractor. Once inside the facility, the hacker gathers information from trashcans, desktops, or computer systems.

Posing as an Important User

In this type of attack, the hacker pretends to be an important user such as an executive or high-level manager who needs immediate assistance to gain access to a computer system or files. The hacker uses intimidation so that a lower-level employee such as a help desk worker will assist them in gaining access to the system. Most low-level employees won't question someone who appears to be in a position of authority.

Using a Third Person

Using the third-person approach, a hacker pretends to have permission from an authorized source to use a system. This attack is especially effective if the supposed authorized source is on vacation or can't be contacted for verification.

Calling Technical Support

Calling tech support for assistance is a classic social-engineering technique. Help desk and technical support personnel are trained to help users, which makes them good prey for social-engineering attacks.

Shoulder Surfing 

Shoulder surfing is a technique of gathering passwords by watching over a person's shoulder while they log in to the system. A hacker can watch a valid user log in and then use that password to gain access to the system.

Dumpster Diving

Dumpster diving involves looking in the trash for information written on pieces of paper or computer printouts. The hacker can often find passwords, filenames, or other pieces of confidential information.

Computer-Based Social Engineering

Computer-based social-engineering attacks can include the following:
  • Email attachments
  • Fake websites
  • Pop-up windows


Insider Attacks

If a hacker can't find any other way to hack an organization, the next best option is to infiltrate the organization by getting hired as an employee or finding a disgruntled employee to assist in the attack. Insider attacks can be powerful because employees have physical access and are able to move freely about the organization. An example might be someone posing as a delivery person by wearing a uniform and gaining access to a delivery room or loading dock. Another possibility is someone posing as a member of the cleaning crew who has access to the inside of the building and is usually able to move about the offices. As a last resort, a hacker might bribe or otherwise coerce an employee to participate in the attack by providing information such as passwords.

Identity Theft

A hacker can pose as an employee or steal the employee's identity to perpetrate an attack. Information gathered in dumpster diving or shoulder surfing in combination with creating fake ID badges can gain the hacker entry into an organization. Creating a persona that can enter the building unchallenged is the goal of identity theft.

Phishing Attacks

Phishing involves sending an email, usually posing as a bank, credit card company, or other financial organization. The email requests that the recipient confirm banking information or reset passwords or PINs. The user clicks the link in the email and is redirected to a fake website. The hacker is then able to capture this information and use it for financial gain or to perpetrate other attacks. Emails that claim the senders have a great amount of money but need your help getting it out of the country are examples of phishing attacks. These attacks prey on the common person and are aimed at getting them to provide bank account access codes or other confidential information to the hacker.

Online Scams

Some websites that make free offers or other special deals can lure a victim to enter a username and password that may be the same as those they use to access their work system.
The hacker can use this valid username and password once the user enters the information in the website form. Mail attachments can be used to send malicious code to a victim's system, which could automatically execute something like a software keylogger to capture passwords. Viruses, Trojans, and worms can be included in cleverly crafted emails to entice a victim to open the attachment. Mail attachments are considered a computer-based social-engineering attack.Related links
  1. Hacker Tools
  2. New Hack Tools
  3. Hacking Tools
  4. Pentest Tools Open Source
  5. Hacking Tools Kit
  6. Hacker Tools Linux
  7. Pentest Tools For Ubuntu
  8. Hack Tools For Ubuntu
  9. Pentest Tools Alternative
  10. Hacker Tools Online
  11. Nsa Hacker Tools
  12. Hacking Tools Download
  13. How To Make Hacking Tools
  14. Hackrf Tools
  15. Hack Tool Apk
  16. Top Pentest Tools
  17. Pentest Tools Download
  18. Pentest Tools Linux
  19. Hacker Tools List
  20. Growth Hacker Tools
  21. Hack Apps
  22. Hacking Tools For Mac
  23. Pentest Tools Review
  24. Black Hat Hacker Tools
  25. Hacker
  26. Hack Tool Apk No Root
  27. Free Pentest Tools For Windows
  28. What Are Hacking Tools
  29. Pentest Tools
  30. Hacker Hardware Tools
  31. Hacker Tools List
  32. Hacking Tools Hardware
  33. Hacker Search Tools
  34. Android Hack Tools Github
  35. Pentest Tools Framework
  36. Kik Hack Tools
  37. Pentest Tools Linux
  38. Pentest Tools Website
  39. Hacking Tools Mac
  40. Pentest Tools For Mac
  41. Pentest Tools Kali Linux
  42. Pentest Tools Alternative
  43. Hacker Tools Free Download
  44. Hacking Tools For Windows Free Download
  45. Nsa Hack Tools
  46. Hacking Tools 2019
  47. Hack Tools Github
  48. Nsa Hack Tools Download
  49. Hacker Tools 2019
  50. Pentest Tools Bluekeep
  51. Growth Hacker Tools
  52. Pentest Tools For Android
  53. Hacker Hardware Tools
  54. Hack Tools Pc
  55. Hacking Tools
  56. Hacking Tools For Windows
  57. Pentest Tools Alternative
  58. Pentest Box Tools Download
  59. Hacker Tools For Windows
  60. Game Hacking
  61. New Hacker Tools
  62. Pentest Tools For Mac
  63. Hack Tools For Ubuntu
  64. Hacking Tools Download
  65. Physical Pentest Tools
  66. Hack App
  67. Hack Tools For Mac
  68. Termux Hacking Tools 2019
  69. Pentest Tools Open Source
  70. Hacking Tools And Software
  71. Hacker Tools Free
  72. Hacker Techniques Tools And Incident Handling
  73. How To Install Pentest Tools In Ubuntu
  74. Pentest Tools
  75. Hacking Tools For Windows Free Download
  76. What Is Hacking Tools
  77. Hacking Tools Windows
  78. Hacking Tools Windows 10
  79. Free Pentest Tools For Windows
  80. Pentest Tools Github
  81. Pentest Recon Tools
  82. Hack Tools Online
  83. Hacking Tools Hardware
  84. Hacking Tools Github
  85. Hack Tools Online
  86. Nsa Hack Tools Download
  87. Pentest Tools Free
  88. Hack And Tools
  89. Hack Website Online Tool
  90. Hacking App
  91. Hacking Tools Free Download
  92. Hack Tools For Ubuntu
  93. Hacker Tools For Mac
  94. Hacker Tools Windows
  95. Pentest Tools Nmap
  96. Hacker Tools For Windows
  97. Termux Hacking Tools 2019
  98. Underground Hacker Sites
  99. Hacking App
  100. Hacker Tools Apk Download
  101. Pentest Tools Framework
  102. Best Pentesting Tools 2018
  103. Game Hacking
  104. Pentest Tools Android
  105. Tools Used For Hacking
  106. Hacker Tools For Pc
  107. Hack Tools
  108. Pentest Tools
  109. Hacking App
  110. Ethical Hacker Tools
  111. Hacking Tools Download
  112. Pentest Tools Apk
  113. Hacker Search Tools
  114. Pentest Box Tools Download
  115. Hacks And Tools
  116. Hacking Tools Windows 10
  117. Hacker Tools Github
  118. Hack Tools
  119. Hacker Tools For Ios
  120. Hacker Tools Apk
  121. Pentest Tools Android
  122. Hack Tools Github
  123. Best Hacking Tools 2019
  124. World No 1 Hacker Software
  125. Hacking Tools For Pc
  126. Hackers Toolbox
  127. Pentest Box Tools Download
  128. Hacking Tools Name
  129. Pentest Tools Linux
  130. Pentest Tools For Ubuntu
  131. Wifi Hacker Tools For Windows
  132. Pentest Tools Kali Linux
  133. Hack Rom Tools
  134. Hack Tools For Pc
  135. How To Hack
  136. Hack Tools Github
  137. Game Hacking
  138. Hack Tools For Games
  139. Hack Tools Online
  140. Hacking Tools For Windows Free Download
  141. Hacker Tools List
  142. Hacks And Tools
  143. Best Hacking Tools 2020
  144. Pentest Tools Find Subdomains
  145. Hacking Tools For Pc
  146. Hacker Tools Mac
  147. Pentest Tools Framework
  148. Hacking Apps
  149. Hacks And Tools
  150. Pentest Tools Free
  151. Hack Tools For Games
  152. New Hack Tools
  153. Tools 4 Hack
  154. Black Hat Hacker Tools
  155. Hacking Tools Software
  156. Hacking Tools Hardware
  157. Hacking App
  158. Hacking Tools For Kali Linux
  159. Underground Hacker Sites
  160. Hacking Apps
  161. Hacker Tools For Mac
  162. Usb Pentest Tools
  163. Tools Used For Hacking
  164. How To Make Hacking Tools
  165. Hacking Tools Online
  166. Pentest Tools Port Scanner
  167. Hacker Search Tools
  168. Game Hacking
  169. Hacking Apps
  170. Hacking Tools
  171. Hacker Tools For Ios
  172. Github Hacking Tools
  173. Black Hat Hacker Tools
  174. Pentest Tools Android
  175. Hacker Tools For Windows
  176. Nsa Hack Tools Download

Networking | Routing And Switching | Tutorial 2 | 2018


Welcome to my 2nd tutorial of the series of networking. In this video I've briefly described peer to peer network (P2P). Moreover, you'll see how to make a peer to peer network? How it's working? How we can intercept traffic over the network by using Wireshark? and many more. Wireshark tool is integrated with eNSP so it'll be installed automatically when you install the eNSP. On the other hand, you can install the Wireshark for your personal use from its website.

What is Peer to Peer (P2P) network? 

As when devices are connected with each other for the sake of communication that'll be known as a Network. Now what is peer to peer network? In P2P network each and every device is behaving like a server and a client as well. Moreover They are directly connected with each other in such a way that they can send and received data to other devices at the same time and there is no need of any central server in between them.

There is a question that mostly comes up into our minds that  Is it possible to capture data from the network? So the answer is yes. We can easily captured data from the network with the help of tools that have been created for network troubleshooting, so whenever there will be some issues happening to the network so we fixed that issues with the help of tools. Most usable tool for data capturing that every network analyst used named Wireshark but there are so many other tools available over the internet like SmartSniff, Ethereal, Colasoft Capsa Network Analyze, URL Helper, SoftX HTTP Debugger and many more.

What is Wireshark?

Wireshark is an open source network analyzer or sniffer used to capture packets from the network and tries to display the brief information about the packets. It is also used for software and communication protocol development. Moreover, Wireshark is the best tool to intercept the traffic over the network.


Figura 2: Bad Guys Never Sleep
Curiosamente, en esa charla hablaba de las estafa de los BitCoins usando la imagen de personas populares, que al cabo del tiempo han hecho con mi imagen. Así que ten mucho cuidado con tu dinero y no te creas todas las Fake News que veas por la red.

El segundo vídeo que so dejo es una entrevista que me hizo hace muy pocos días el periodista Juan Gómez para el programa de radio Nueva Dimensión donde hablamos de de hacking, de los riesgos de privacidad, la inteligencia artificial usada para suplantar personas, etcétera...


Figura 3: Entrevista a Chema Alonso en Nueva Dimensión

Mucho e lo que hablamos se basa en la conferencia que dicté como Keynote en el Security Innovation Day 2019 de ElevenPaths, que si no las visto la tienes aquí mismo. Mucho de lo que cuento en la entrevista lo puedes ver en directo con demos.


Figura 4: Keynote de Chema Alonso en Security Innovation Day 2019

Y por último, un nuevo Podcast de ElevenPaths Radio, en este caso con Josep Albors de ESET y Andrés Naranjo, aka TheXXLMan, hablando de Ciberseguridad & Gaming, que, estoy convencido, a los gamers os resultará más que interesante.


Figura 5: ElevenPaths Radio: Ciberseguridad & Gaming

Y nada más, si queréis contactar con alguno de nosotros, ya sabéis que gracias a ESET puedes conseguir 100 Tempos gratis en MyPublicInbox.

Saludos Malignos!

Autor: Chema Alonso (Contactar con Chema Alonso)

Related articles