Saturday, June 3, 2023

System Hacking: Password Cracking Techniques And Types Of Passwords


This blog based on two major concepts:
  • Understand password-cracking techniques
  • Understand different types of passwords
  •  

The simplest way to crack the passwords

The first step is to access the system is that you should know how to crack the password of the target system. Passwords are the key element of information require to access the system, and users also selects passwords that are easy to guess such as mostly people has a passwords of their pet's name or room number etc to help them remember it. Because of this human factor, most password guessing is successful if some information is known about the target. Information gathering and reconnaissance can help give away information that will help a hacker guess a user's password.

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.

Types of Passwords 

  • Only numbers
  • Only letters
  • Only special characters
  • Letters and numbers
  • Only letters and special characters 
  • Numbers, letters and special characters
A strong password is less susceptible to attack by a hacker. The following rules, proposed by the EC-Council, should be applied when you're creating a password, to protect it against attacks:
  • Must not contain any part of the user's account name
  • Must have a minimum of eight characters
  • Must contain characters from at least three of the following categories:
    • Non alphanumeric symbols ($,:"%@!#)
    • Numbers
    • Uppercase letters
    • Lowercase letters
A hacker may use different types of attacks in order to identify a password and gain further access to a system. The types of password attacks are as follows:

Passive Online

​Eavesdropping on network password exchanges. Passive online attacks
include sniffing, man-in-the-middle, and replay attacks. Moreover, a passive online attack is also known as sniffing the password on a wired or wireless network. A passive attack is not detectable to the end user. The password is captured during the authentication process and can then be compared against a dictionary file or word list. User account passwords are commonly hashed or encrypted when sent on the network to prevent unauthorized access and use. If the password is protected by encryption or hashing, special tools in the hacker's toolkit can be used to break the algorithm.

Another passive online attack is known as man-in-the-middle (MITM). In a MITM attack, the hacker intercepts the authentication request and forwards it to the server. By inserting a sniffer between the client and the server, the hacker is able to sniff both connections and capture passwords in the process.

A replay attack is also a passive online attack; it occurs when the hacker intercepts the password en route to the authentication server and then captures and resend the authentication packets for later authentication. In this manner, the hacker doesn't have to break the password or learn the password through MITM but rather captures the password and reuses the password-authentication packets later to authenticate as the client.

Active Online

Guessing the Administrator password. Active online attacks include auto-
mated password guessing. Moreover, The easiest way to gain administrator-level access to a system is to guess a simple password assuming the administrator used a simple password. Password guessing is an active online attack. It relies on the human factor involved in password creation and only works on weak
passwords.

Assuming that the NetBIOS TCP 139 port is open, the most effective method of breaking into a Windows NT or Windows 2000 system is password guessing. This is done by attempting to connect to an enumerated share ( IPC$ or C$ ) and trying a username and password combination. The most commonly used Administrator account and password combinations are words like Admin, Administrator, Sysadmin, or Password, or a null password.
A hacker may first try to connect to a default Admin$ , C$ , or C:\Windows share. To connect to the hidden C: drive share, for example, type the following command in the Run field (Start ➪ Run):

\\ip_address\c$

Automated programs can quickly generate dictionary files, word lists, or every possible combination of letters, numbers, and special characters and then attempt to log on using those credentials. Most systems prevent this type of attack by setting a maximum number of login attempts on a system before the account is locked.

In the following sections, we'll discuss how hackers can perform automated password guessing more closely, as well as countermeasures to such attacks.

Performing Automated Password Guessing

To speed up the guessing of a password, hackers use automated tools. An easy process for automating password guessing is to use the Windows shell commands based on the standard NET USE syntax. To create a simple automated password-guessing script, perform the following steps:
  1. Create a simple username and password file using Windows Notepad. Automated tools such as the Dictionary Generator are available to create this word list. Save the file on the C: drive as credentials.txt.
  2. Pipe this file using the FOR command: C:\> FOR /F "token=1, 2*" %i in (credentials.txt)
  3. Type net use \\targetIP\IPC$ %i /u: %j to use the credentials.txt file to attempt to log on to the target system's hidden share.

Offline Attacks

Offline attacks are performed from a location other than the actual computer where the passwords reside or were used. Offline attacks usually require physical access to the computer and copying the password file from the system onto removable media. The hacker then takes the file to another computer to perform the cracking. Several types of offline password attacks exist.

Types of Attack Characteristics Password Example
Dictionary attack Attempts to use passwords from a list of dictionary words Administrator
Hybrid attack Substitutes numbers of symbols for password characters Adm1n1strator
Brute-force attack Tries all possible combinations of letters, numbers, and special characters Ms!tr245@F5a

A dictionary attack is the simplest and quickest type of attack. It's used to identify a password that is an actual word, which can be found in a dictionary. Most commonly, the attack uses a dictionary file of possible words, which is hashed using the same algorithm used by the authentication process. Then, the hashed dictionary words are compared with hashed passwords as the user logs on, or with passwords stored in a file on the server. The dictionary attack works only if the password is an actual dictionary word; therefore, this type of attack has some limitations. It can't be used against strong passwords containing numbers or other symbols.

A hybrid attack is the next level of attack a hacker attempts if the password can't be found using a dictionary attack. The hybrid attack starts with a dictionary file and substitutes numbers and symbols for characters in the password. For example, many users add the number 1 to the end of their password to meet strong password requirements. A hybrid attack is designed to find those types of anomalies in passwords.

The most time-consuming type of attack is a brute-force attack, which tries every possible combination of uppercase and lowercase letters, numbers, and symbols. A brute-force attack is the slowest of the three types of attacks because of the many possible combinations of characters in the password. However, brute force is effective; given enough time and processing power, all passwords can eventually be identified.

Related articles


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

Friday, June 2, 2023

Learning Resources For Hacking And Pentesting


In this article, I'm going to provide you a list of resources which I have found very useful. I don't remember all of them from top of my head so I might miss some. This list will be updated on usual basis. Hope you'll find some good stuff to learn. If you have got suggestions leave them down below in the comments section.

Free Hands on Labs:

1. Hack The Box - live machines to hack your way around. Besides boxes they have awesome challenges and great labs to try out.
2. TryHackMe - great way to learn pentesting while doing it. Lots of machines to hack and lots of ground to cover.
3. Portswigger Web Security Academy - learn web application pentesting.

Free Training (Mostly Introductory stuff):

1. Tenable University - training and certification on Nessus etc.
2. Palo Alto Networks - Palo Alto Networks offers an abundance of resources to prepare for there certifications. The training is free but the exams cost.
3. Open P-TECH - has an introductory course on Cybersecurity Fundamentals.
4. IBM Security Learning Academy - has many courses but focused on IBM security services and 
products.
5. Cisco Networking Academy - not all courses are free but Introduction to Cybersecurity and Cybersecurity Essentials are free.
6. AWS Training and Certification - has some free cloud security training courses.
7. Metasploit Unleashed - Free Online Ethical Hacking Course - Offensive Security's free online course on metasploit.
8. Coursera and Edx - you already know about them.

Blogs:

1. HackTricks - This is simply an awesome blog just visit it and you'll fall in love.
2. pentestmonkey - I visit it most of the time for one-liner reverse shells they are awesome.

Writeups:

1. 0xdf

YouTube:

1. ippsec - an awesome YouTube channel with tons of information in every video. New video comes out weekly as soon as the machine on hackthebox expires. https://ippsec.rocks for video searching
2. xct - short walkthroughs on hackthebox machines.
3. Cristi Vlad - advice and content on pentesting and python.
4. LiveOverflow - reverse engineering on steroids.
5. SANS Pen Test Training - SANS institute webinars and talks.
6. VbScrub - great pentesting videos.
7. BinaryAdventure - great pentesting and reverse engineering videos.
8. GynvaelEN - great videos and talks about CTFs and pentesting.

GitHub Repos:

1. PayloadsAllTheThings - heaven of hackers.
2. Pentest Monkey - reverse shells and more.

Related news


Reversing Some C++ Io Operations

In general decompilers are not friendly with c++ let's analyse a simple program to get familiar with it.
Let's implement a simple code that loads a file into a vector and then save the vector with following functions:

  • err
  • load
  • save
  • main


Lets identify the typical way in C++ to print to stdout with the operator "<<"


The basic_ostream is initialized writing the word "error" to the cout, and then the operator<< again to add the endl.




The Main function simply calls  "vec = load(filename)"  but the compiler modified it and passed the vector pointer as a parámeter. Then it bulds and prints "loaded  " << size << " users".
And finally saves the vector to /tmp/pwd and print "saved".
Most of the mess is basically the operator "<<" to concat and print values.
Also note that the vectors and strings are automatically deallocated when exit the function.


And here is the code:


Let's take a look to the load function, which iterates the ifs.getline() and push to the vector.
First of all there is a mess on the function definition, __return_storage_ptr is the vector.
the ifstream object ifs is initialized as a basic_ifstream and then operator! checks if it wasn't possible to open the file and in that case calls err()
We see the memset and a loop, getline read a cstr like line from the file, and then is converted to a string before pushing it to the vector. lVar1 is the stack canary value.

In this situations dont obfuscate with the vector pointer vec initialization at the begining, in this case the logic is quite clear.



The function save is a bit more tricky, but it's no more than a vector iteration and ofs writing.
Looping a simple "for (auto s : *vec)" in the decompiler is quite dense, but we can see clearly two write, the second write DAT_0010400b is a "\n"



As we see, save implememtation is quite straightforward.




Related posts

  1. Hacker Tools Mac
  2. Bluetooth Hacking Tools Kali
  3. Hacker Tools Hardware
  4. Pentest Box Tools Download
  5. Termux Hacking Tools 2019
  6. Pentest Tools Subdomain
  7. Pentest Tools Subdomain
  8. Hacker Tools For Windows
  9. Pentest Reporting Tools
  10. Hacking Tools And Software
  11. Hacking Tools 2020
  12. Pentest Tools Open Source
  13. Hacker Tools Hardware
  14. Hack Tool Apk No Root
  15. Hacker Tools Apk
  16. Hack Tools
  17. Hack Tools For Windows
  18. Pentest Tools Free
  19. Pentest Tools Review
  20. Hacking Tools For Mac
  21. Blackhat Hacker Tools
  22. Hack Tools
  23. Hak5 Tools
  24. Pentest Tools Port Scanner
  25. Hacking Tools Software
  26. Hacker Tools Mac
  27. Hacking Tools For Mac
  28. Hack Tools Download
  29. Hack And Tools
  30. Pentest Tools Apk
  31. Pentest Tools Online
  32. Pentest Tools Alternative
  33. Hacking Tools For Mac
  34. Hacker Tools Free Download
  35. How To Make Hacking Tools
  36. Hacking Tools For Pc
  37. World No 1 Hacker Software
  38. Hacker
  39. Hack Tools Download
  40. Nsa Hack Tools Download
  41. Pentest Tools Online
  42. Hacking Tools For Games
  43. Hacker
  44. Hacking Tools Software
  45. Install Pentest Tools Ubuntu
  46. Hacking Tools For Windows
  47. Hacker
  48. New Hacker Tools
  49. Hacking Tools Download
  50. Hack Tools For Mac
  51. Nsa Hack Tools
  52. Hacker Techniques Tools And Incident Handling
  53. Hack Tools 2019
  54. Hacker Tools 2019
  55. What Is Hacking Tools

Fast Emulator For Shellcodes In Rust

I have developed a fast emulator for modern shellcodes, that perform huge loops of millions of instructions emulated for resolving API or for other stuff.

The emulator is in Rust and all the few dependencies as well, so the rust safety is good for emulating malware.  

There are shellcodes that can be emulated from the beginning to the end, but when this is not possible the tool has many features that can be used like a console, a memory tracing, register tracing, and so on.

https://github.com/sha0coder/scemu



In less than two seconds we have emulated 7 millions of instructions arriving to the recv. 

At this point we have some  IOC like  the ip:port where it's connecting and other details.

Lets see what happens after the recv() spawning a console at position: 7,012,204


target/release/scemu -f shellcodes/shikata.bin -vv -c 7012204



In the console, pressing "enter" several times to emulate  step into several steps and we arrive to a return instruction.


Let's see the stack in this moment:


The "ret" instruction is going to jump to the buffer read with recv() so is a kind of stager.

The option "-e" or "--endpoint" is not ready for now, but it will allow to proxy the calls to get the next  stage automatically, but for now we have the details to get the stage.


SCEMU also identify all the Linux  syscalls for 32bits shellcodes:



The encoder used in shellgen is also supported https://github.com/MarioVilas/shellgen

Let's check with cobalt-strike:


We can see where is connecting and which headers is using, so right now we can replicate the communications.



In verbose mode we could do several greps to see the calls and correlate with ghidra/ida/radare or  for example grep the branches to study the emulation flow.


target/release/scemu -f shellcodes/rshell_sgn.bin -vv | grep j


target/release/scemu -f shellcodes/rshell_sgn.bin -vv -c 44000 -l


The -l --loops options makes the emulation a bit slower but track the number of iterations.

Is possible to print all the registers in every step with  -r or --registers  but also is possible to track  specific register for example with --reg esi


target/release/scemu -f shellcodes/shikata.bin --reg esi 


In this case ESI register points to the API name, if we track EAX or ECX will see that are the counters of the loop. These shellcodes  contains a hard loop to locate the API names.

The flag -i or --inspect allow to monitor memory using expressions like "dword ptr [eax + 0xa]"

target/release/scemu -f shellcodes/shikata.bin -i 'dword ptr [esi]'

And more things to come...  find a demo below:

https://www.youtube.com/watch?v=qTYmMjW3DFs





Continue reading