# BSMP-2016-ISCSI-Packet-Injection
This is a repo that contains code for creating a system to hijack and insert data into an iSCSI stream

INSTALL
------------
1 - Open Target and Initiator .Vagrantfile folder and run $ bash vagrant up

2.a - On Initiator, run:

	$ bash sudo iscsiadm -m discovery -t st -p "target_ip" 

	$ bash sudo iscsiadm -m node -T "iqn.2016-06.local.iit:storage.sys0" -p "target_ip" --login

	- after login, a disk is created to represent the iSCSI target LUN.	Such disk can be on sdb, sdc or sdd, accordingly with the order it was found. Check which one represents the iSCSI Target LUN running the command "sudo fdisk -l". The disk representing the iSCSI Target LUN has 2MB of size.

	- Once the disk was identified, run $ sudo mount /dev/sd(b|c|d) /mnt to access the Target LUN.

2.b - On Target:

	- make sure iscsitarget service is running:

		$ bash netstat -tl

  	- download, add execution permissions and run the iSCSI-target-setup.sh if you want to test a new file being available in the LUN 0.


# BSMP-2016-ISCSI-Packet-Injection
This is a repo that contains code for creating a system to hijack and insert data into an iSCSI stream

INSTALL
------------
1 - Open Target and Initiator .Vagrantfile folder and run $ bash vagrant up

2.a - On Initiator, run:

	$ bash sudo iscsiadm -m discovery -t st -p "target_ip" 

	$ bash sudo iscsiadm -m node -T "iqn.2016-06.local.iit:storage.sys0" -p "target_ip" --login

	- after login, a disk is created to represent the iSCSI target LUN.	Such disk can be on sdb, sdc or sdd, accordingly with the order it was found. Check which one represents the iSCSI Target LUN running the command "sudo fdisk -l". The disk representing the iSCSI Target LUN has 2MB of size.

	- Once the disk was identified, run $ sudo mount /dev/sd(b|c|d) /mnt to access the Target LUN.

2.b - On Target:

	- make sure iscsitarget service is running:

		$ bash netstat -tl

  	- download, add execution permissions and run the iSCSI-target-setup.sh if you want to test a new file being available in the LUN 0.


 3 - MiTM machine:

 	- Download .ova machine on https://drive.google.com/open?id=0B4MZu1rZKHeDaC1WUkdGc1BhZGc

 	- import appliance on Virtualbox. Use username as root and password as admin.

 	- Run mitm-arp.py script to begin the man in the middle attack on initiator and target


Add instructions to run MiTM with Kali and scappy.
Add instructions to run MiTM with Kali and scappy.
