Below, you can find the instructions on how to A) Generate a binary file for a shrew stream; B) Generate a UDP-based shrew stream C) Setup TCP's retransmission timer according to RFC 2988, and to install a Linux kernel. A) How to generate a binary file for a DoS stream: ------------------------------------------------- Files: ----- /dos-udp-mtlb/ mk_dos_trace.c - c file for generating binary DoS stream a.out or mk_dos_trace.out - executible files for getting txt format of DoS stream pswrite.m - matlab file for getting binary DoS file psload.m - matlab file for converting binary file into txt file How to do it: ------------ 1. gcc mk_dos_trace.c - you will get a.out 2. cp a.out mk_dos_trace.out - just rename the file 3. mk_dos_trace.out rate1 length1 rate2 length2 period pack_size file_name.txt - in this way we obtain file_name.txt - a text version of DoS file, where the interarrival times are printed in ms. The lenghth of the stream is 1000 sec. (however, the maximum number of packets that linuxSend supports is 100000 packets, which might later limit the length of the DoS stream) Also, in the above command, rate1 and rate 2 are in Mbps, while length1, length2 and period are in ms. E.g., for a 10 Mbps (peak) stream with on period of 100ms and period of the attack of 1.1 sec, you should run: mk_dos_trace.out 0 0 10 100 1100 50 file_name.txt 4. cd /usr/site/bin 5. matlab 6. a = load('file_name.txt') where file_name.txt is from part 3. of this text 7. pswrite('test_file.bin',a) 8. (optional) psload('test_file.bin') to check if the bin file is well done. 9. move *.bin file to the sender machine. B) How to generate a DoS stream: ------------------------------- B.1) Machines used: ------------------ 1. sender machine (IP 1.1.1.1) 2. receiver machine (IP 2.2.2.2) B.2) Receiver side: ------------------ 1. ssh 2.2.2.2 2. cd rtps/ 3. echo_server B.3) Sender side: ---------------- 1. ssh 1.1.1.1 (open one shell) 2. cd rtps/ 3. ./linuxps 2.2.2.2 7775 4. ssh 1.1.1.1 (open another shell) 5. cd rtps/ 6. ./linuxSend test_file.bin and the DoS stream is sent from 1.1.1.1 to 2.2.2.2 The packet size is by default 50 Bytes. Optional: --- To change the default packet size: 1. go to sendAppl.c and change # define PACKET_SIZE 50 2. ./complinux --- Also, as said above, the stream does not have to last 1000 sec, since there is a bound on the maximum number of packets that can be sent. It is 100000 at this moment. --- To change the maximum output file size: 1. go to sendAppl.c and change # define DATA_FILE_SIZE 500000 2. ./complinux --- C) How to setup TCP's retransmission timer according to RFC 2988, and how to install Linux kernel. -------------------------------------------------------------- To set the minRTO parameter to 1 sec, you need to change the line #define TCP_RTO_MIN ((unsigned)(HZ/5)) into #define TCP_RTO_MIN ((unsigned)(HZ)) in the tcp.h file. An example tcp.h file is given in ./tcp/ directory. Also, the linux-2.4.18 kernel that we used in the experiments is available in the same directory (./tcp/). A guidance on installing Linux kernel could be found on http://www.ece.rice.edu/networks/TCP-LP/linux/tcp-lp-linux.htm