nerdexam
GIAC

GCIH · Question #747

What is the destination endpoint host for the SSH session shown below? ssh - L 1777:192.168.1.80:23 [email protected]

The correct answer is C. 192.168.1.80 port 23. In SSH local port forwarding, the -L flag syntax is local_port:destination_host:destination_port, so the final destination is the host and port after the colon separator following the local port.

Vulnerability Exploitation & Privilege Escalation

Question

What is the destination endpoint host for the SSH session shown below? ssh - L 1777:192.168.1.80:23 [email protected]

Options

  • A192.168.1.80 port 1777
  • B192.168.1.70 port 1777
  • C192.168.1.80 port 23
  • D192.168.1.70 port 23

How the community answered

(16 responses)
  • A
    6% (1)
  • B
    6% (1)
  • C
    75% (12)
  • D
    13% (2)

Why each option

In SSH local port forwarding, the -L flag syntax is local_port:destination_host:destination_port, so the final destination is the host and port after the colon separator following the local port.

A192.168.1.80 port 1777

Port 1777 is the local listening port on the client machine, not the destination port on the remote endpoint; 192.168.1.80 is correct but port 1777 is not the destination port.

B192.168.1.70 port 1777

192.168.1.70 is the SSH jump/relay server (the host zmckracken authenticates to), not the final destination endpoint of the tunnel.

C192.168.1.80 port 23Correct

The command 'ssh -L 1777:192.168.1.80:23' creates a local tunnel where connections to local port 1777 are forwarded through the SSH server (192.168.1.70) to the destination endpoint 192.168.1.80 on port 23. Port 23 is Telnet, and 192.168.1.80 is the ultimate target host that receives the forwarded traffic.

D192.168.1.70 port 23

192.168.1.70 is the SSH server used as the tunnel relay, not the destination endpoint; the traffic is forwarded onward to 192.168.1.80:23.

Concept tested: SSH local port forwarding -L flag syntax and tunnel destination

Source: https://www.ssh.com/academy/ssh/tunneling/example

Topics

#SSH tunneling#local port forwarding#network pivoting#lateral movement

Community Discussion

No community discussion yet for this question.

Full GCIH Practice