TGViewer
C.I.T. Security C.I.T. Security @citsecurity · 8.96K subscribers
Post #9887 979
📶 Очень объемный гайд с примерами организации SSH туннелей для решения различных задач. Данный материал будет полезен специалистам по безопасности и тем, кто изучает сети. Содержание следующее:

• Introduction.
• Part 1: Setting Up the Target Web Server:
➡Installing Apache2 on the Target Machine;
➡Creating a Custom Web Directory and HTML File;
➡Configuring Apache2 to Listen Only on Loopback Port 8080;
➡Configuring the Apache2 Virtual Host;
➡Enabling the Site and Restarting Apache2;
➡Verifying Local Access on the Target Machine;
➡Confirming the Service is Not Remotely Accessible.

• Part 2: Local Port Forwarding:
➡Verifying Port 8000 is Closed Before Tunnelling;
➡Establishing the SSH Local Port Forward;
➡Running the Tunnel in the Background;
➡Verifying the Tunnel with Nmap;
➡Accessing the Remote Service Through the Tunnel;
➡Verifying the Active Tunnel with Netstat.

• Part 3: Dynamic Port Forwarding (SOCKS Proxy):
➡Establishing the Dynamic Port Forward;
➡Verifying the SOCKS Proxy with Netstat;
➡Configuring Proxychains;
➡Launching Firefox Through Proxychains;
➡Accessing the Internal Service via Dynamic Proxy.

• Part 4: Remote Port Forwarding:
➡Establishing the SSH Remote Port Forward;
➡Verifying the Remote Forward with Netstat on the SSH Server.

• Part 5: RDP Access via Dynamic Port Forwarding and Proxychains:
➡Establishing the SSH Dynamic Tunnel from Kali;
➡Launching rdesktop Through Proxychains;
➡Windows RDP Login Screen via Proxychains;
➡Accessing the Windows Desktop.

• Part 6: RDP Access via SSH Remote Port Forwarding from the Pivot Host:
➡Initiating Remote Port Forward from Ubuntu to Kali;
➡Verifying the Remote Forward on Kali with Netstat;
➡Accessing RDP Directly on Kali’s Loopback.

• Part 7: RDP Access via GatewayPorts — Exposing the Tunnel to the Network:
➡Checking the Default GatewayPorts Setting;
➡Enabling GatewayPorts;
➡Restarting the SSH Service;
➡Initiating Remote Port Forward from Windows to Ubuntu;
➡Direct RDP Connection from Kali Using the Network IP;
➡Full Windows Desktop via GatewayPorts RDP Tunnel.

• Conclusion.
• Mitigation Strategies.


➡️ https://www.hackingarticles.in/ssh-port-forwarding-tunnelling

• В дополнение: практические примеры SSH.

➡SSH socks-прокси;
➡Туннель SSH (переадресация портов);
➡SSH-туннель на третий хост;
➡Обратный SSH-туннель;
➡Обратный прокси SSH;
➡Установка VPN по SSH;
➡Копирование ключа SSH (ssh-copy-id);
➡Удалённое выполнение команд (неинтерактивно);
➡Удалённый перехват пакетов и просмотр в Wireshark;
➡Копирование локальной папки на удалённый сервер по SSH;
➡Удалённые приложения GUI с переадресацией SSH X11;
➡Удалённое копирование файлов с помощью rsync и SSH;
➡SSH через сеть Tor;
➡SSH к инстансу EC2;
➡Редактирование текстовых файлов с помощью VIM через ssh/scp;
➡Монтирование удалённого SSH как локальной папки с SSHFS;
➡Мультиплексирование SSH с помощью ControlPath;
➡Потоковое видео по SSH с помощью VLC и SFTP;
➡Двухфакторная аутентификация;
➡Прыжки по хостам с SSH и -J;
➡Блокировка попыток брутфорса SSH с помощью iptables;
➡SSH Escape для изменения переадресации портов;

#SSH
  • ❤ 1
More from @citsecurity
  1. Sep 25, 2026📄 𝗧𝗼𝗼𝗹𝘀 𝗣𝗮𝗰𝗸 📦 Over 100 Scripts about 👉 C & C++ 👉 PHP Shells 👉 Perl 👉 Pytho…
  2. Sep 25, 2026PHISHING ATTACKS WITH OFFICE MACROS Executable files are usually blocked in e-mails, so th…
  3. Sep 25, 2026𝗣𝗛𝗜𝗦𝗛𝗜𝗡𝗚 Phishing is the attempt to acquire sensitive information by disguising it…
  4. Sep 25, 2026document post
  5. Sep 25, 2026document post
  6. Sep 25, 2026Domain Info Gathering 1️⃣ WHOIS query 2️⃣ DNS query 3️⃣ NsLookup query 4️⃣ Domain name del…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →