PrepAway - Latest Free Exam Questions & Answers

Which of the following commands accomplish this?

You want to use netcat to generate huge amount of useless network data continuously for various performance testing between 2 hosts.

Which of the following commands accomplish this?

PrepAway - Latest Free Exam Questions & Answers

A.
Machine A
#yes AAAAAAAAAAAAAAAAAAAAAA | nc �v �v �l �p 2222 > /dev/null Machine B
#yes BBBBBBBBBBBBBBBBBBBBBB | nc machinea 2222 > /dev/null

B.
Machine A
cat somefile | nc �v �v �l �p 2222
Machine B
cat somefile | nc othermachine 2222

C.
Machine A
nc �l �p 1234 | uncompress �c | tar xvfp
Machine B
tar cfp – /some/dir | compress �c | nc �w 3 machinea 1234

D.
Machine A
while true : do
nc �v �l �s �p 6000 machineb 2
Machine B
while true ; do
nc �v �l �s �p 6000 machinea 2
done

Explanation:
Machine A is setting up a listener on port 2222 using the nc command and then having the letter A sent an infinite amount of times, when yes is used to send data yes NEVER stops until it recieves a break signal from the terminal (Control+C), on the client end (machine B), nc is being used as a client to connect to machine A, sending the letter B and infinite amount of times, while both clients have established a TCP connection each client is infinitely sending data to each other, this process will run FOREVER until it has been stopped by an administrator or the attacker.


Leave a Reply