CEH 6-System Hacking

What is System Hacking?

 Disclaimer: The articles provided on HackWithV is purely for informational and educational purpose only, and for those who are willing and curious to know & learn about Ethical Hacking, Security and Penetration Testing. Anytime the word "Hacking" that is used on this site shall be regarded as Ethical Hacking.

 Metasploit

  • Metasploit is a Framework.
  • It used for developing and executing exploit code against a remote target system. 
  • Metasploit Framework contains following modules
  1. Exploits
  2. Encoders
  3. Payloads
  4. Post
  5. Auxiliary
  6. Nop’s

Components of the Metasploit:

  • Msfconsole
  • Msfvenom
  • Armitage

1. Exploit

  • Exploits can help gain superuser-level access to a computer system.
  • Hackers manage to gain low-level access, then they try to escalate privileges to the highest level (root). 
  • The exploit becomes unusable, once the vulnerability is fixed through a patch.
  • Exploits are classified based on how the exploit communicate with the vulnerable software.
  1. A remote exploit works over a network and exploits the security vulnerability without any prior access to the vulnerable system. 
  2. A local exploit requires prior access to the vulnerable system and escalate the privileges of the person running the exploit.

2. Payload

  • The payload is the piece of code in the exploit. 
  • It performs a malicious action.
  • Like deleting data, providing the remote connection, sending spam or encrypting data. 

Types of Payload: 

The Metasploit framework has three different types of payloads
  1. Singles 
  2. Stagers 
  3. Stages

1. Single Payload:

  • Singles are self-contained payloads. 
  • They perform a simple task like adding a user to the target computer and running executable files in the victim’s computer. 
  • These kinds of payloads can be caught with non-Metasploit handlers such as netcat. 
  • These payloads are more stable, because they contain everything in one.

2. Stager payload:

  • Stager payloads are used to set up a network connection between the attacker and victim. 
  • It also provide the remote connection to execute commands. 
  • It is difficult to do both of these, so the result is multiple similar stagers.
  • Metasploit will use the stagers to create the buffer memory in a small portion of memory.
  • These stagers are responsible for downloading a large payload (the stage), injecting it into memory, and passing execution to it.

3. Stage payload:

  • Stage payloads are the components of the stagers that are downloaded in the exploited PC by the Stagers. 
  • The various payload stages provide the advanced features with no size limit such as Meterpreter, VNC injection, etc.

3. Auxiliary

  • An exploit without a payload.
  • It is used for discovery, fingerprinting and automating tasks.

Escalating Privileges

  • This can be done after exploiting the system.
  • Privilege escalation is a technique to exploit existing vulnerabilities.
  • Vulnerabilities in design, misconfigurations in an operating system or in any installed applications to gain elevated access to resources that are usually protected from an application or user.
  • There are two types of privilege escalation.
  1. Vertical Privilege Escalation
  2. Horizontal Privilege Escalation

1. Vertical Privilege Escalation:

  • The attacker grants himself higher privileges. 
  • Privilege escalation is typically achieved by performing kernel-level operations
  • That allow the attacker to run unauthorized code.

2. Horizontal Privilege Escalation:

  • Attacker’s use the same level of privileges he already has been granted. 
  • But assume the identity of another user with similar privileges.

Password Cracking

  • In password cracking, hackers use a different kind of attacks to know the target computer login password. 
  • So that they can gain complete access.

Types of passwords:

  • admin 
  • admin123
  • admin@
  • 6842
  • @!#$%%^
  • 1234!@#$
  • admin@123

Methods To Crack password

1. Password Guessing: 

  • Not a technique, but usually the first thing that every criminal will try to do.

2. Brute Force Attack: 

  • All possible permutations & combinations of the keyboard are tried as the victim's password. 
  • All passwords have to be some permutation or combination of victim's keyboard characters.

3. Dictionary Based Attack:

  • All words in the dictionary are tried as the victim’s password.

4. Syllable attack: 

  • Combination of both, brute force attack and a dictionary attack. 
  • This is often used when the password is a nonexistent word.

5. Default Passwords: 

  • Manufacturers configure the hardware or software with default passwords and settings. 
  • We can get default passwords online for devices(http://defaultpassword.us/).

6. Data Sniffing: 

  • Data sniffer to record passwords being sent across the LAN network in plaintext format.

Mitigation:

  • Operating system software should be updated (patched).
  • Use stronger authentication methods.
  • Enable security auditing to help monitor attacks.
  • Avoid storing user names/password on disk.
  • Change passwords on a frequent basis.
  • Build user awareness on social engineering attacks.

Be Aware, Be Secure.

Thank You 🙏

Comments