펜테스팅 위키
  • Welcome
    • Home
  • 정보 수집
    • OSINT
      • Sub Domain
      • Google Hacking
      • Github
      • IP Address
      • Employees
    • 내부망
      • RID Cycling
      • Password Spraying
      • Password Must Change
      • Extension
        • xlsx/ods
        • pfx
        • vhd
        • pst
        • vbs
        • hc
      • Protocol
        • 21 - FTP
        • 22 - SSH
        • 25 - SMTP
        • 23 - Telnet
        • 53 - DNS
        • 80/443 - HTTP
        • 88 - Kerberos
        • 111 - RPC
        • 135 - msrpc
        • 139/445 - SMB
        • 389/636 - LDAP
        • 1433 - MSSQL
        • 5985/5986 - wsman
  • 초기 침투
    • CVEs
      • CVE-2025-31486
    • Phishing
      • Command File
      • EXE + LNK
      • wax
      • Microsoft Word
    • Web
      • Quary Language
        • SQL
        • GraphQL
      • File Upload
      • File Download
      • XSS
      • SSRF
      • CSRF
      • Open Redirect
      • SOP / CORS
    • ZIP Slip
  • 지속성
    • Active Directory
      • Golden Ticket
      • DC Shadow
      • RID Hijacking
    • Local
      • Task Scheduler
      • Startup Folder
      • Registry AutoRun
      • COM
      • WMI Event Subscription
      • SSH Key Injection
      • DLL Hijacking
      • DLL SideLoading
      • Create Account
  • 권한 상승
    • Active Directory
      • DACL
        • ReadGMSAPassword
        • ReadLAPSPassword
        • ForceChangePassword
        • AddSelf
        • WriteOwner
        • GenericAll
        • GenericWrite
        • WriteSPN
        • AddMembers
        • WriteProperty
        • WriteGPO
        • AddAllowedToAct
        • AllExtendedRights
      • AD CS
        • Abuse Permissions
        • ESC1
        • ESC2
        • ESC3
        • ESC4
        • ESC5
        • ESC6
        • ESC7
        • ESC8
        • ESC9
        • ESC10
        • ESC11
        • CVE-2022-26923
        • Non-PKINIT
      • MS14-068
      • Server Operators
      • DnsAdmins
      • noPac
      • Silver Ticket
      • KrbRelayUp
    • Windows
      • SeImpersonatePrivilege
      • Unquoted Service Path
      • Weak Service Permissions
      • Weak Service Binary Permissions
      • UAC Bypass
      • Always Install Elevated
      • Autoruns
      • Credential Manager
      • Local Service Account
  • 민감정보 탈취
    • Active Directory
      • Kerberoasting
      • Targeted Kerberoast
      • ASRep-Roasting
      • AS Requested Service Tickets
      • Unconstrained Delegation
      • Constrained Delegation
      • Alternate Service Name
      • Resource Based Constrained Delegation
      • DCSync
      • LSASS
      • Shadow Credentials
      • Backup Operators
      • SeEnableDelegationPrivilege
      • Domain Cached Credentials
    • Windows
      • Unattended File
      • DPAPI
      • Hard-coding Credentials
      • SeBackupPrivilege
  • 측면 이동
    • File Transfer
      • SCP
      • ZIP
      • ncat
      • Python
      • PowerShell
      • certutil
      • wget
      • SMB
      • Base64
      • FTP
      • WebDav
      • cURL
    • Pivoting
      • SOCKS
      • Proxyfier
      • Remote Port Forwarding
    • NTLM Relay
    • WinRM
    • PsExec
    • WMI
    • DCOM
    • RDP
    • Port Forwarding
    • Domain Trust Discovery
  • 사용자 가장
    • Pass the Hash
  • Pass the Ticket
  • Overpass the Hash
  • Token Impersonation
  • Make Token
  • Process Injection
  • ETC
    • CS
      • Kerberos
      • NTLM
      • PKINIT
      • Integrity
      • Registry
      • Active Directory Trusts
      • Delegation
      • OAuth 2.0
      • S4U
    • Tools
      • Cobalt Strike
      • BloodHound
      • Certipy-ad
      • LDAP Search
      • Hydra
      • Hashcat
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. 측면 이동
  2. Pivoting

Remote Port Forwarding

PreviousProxyfierNextNTLM Relay

Last updated 20 hours ago

Was this helpful?

리모트 포트 포워딩은 내부망에 있는 비콘이 진단자 로컬로 접근해야 하는 상황에서 사용할 수 있는 포워딩 방식입니다.

그림에서 나오듯 내부망은 외부와 단절되어 있기 때문에 직접적인 통신으로는 접근이 불가능한 경우가 많습니다. 하지만 DMZ에 위치한 호스트를 거친다면 통신이 가능하기 때문에 피벗 호스트를 먼저 장악한 뒤 리모트 포트 포워딩을 통해 내부망의 트래픽을 로컬로 가져올 수 있습니다.

Windows 방화벽이 활성화되어 있을 때 허용되지 않는 포트에서 리스닝을 시도하는 것은 사용자에게 경고 메시지가 전달될 수 있습니다. 때문에 리모트 포트 포워딩 전 방화벽 허용 규칙을 생성한 뒤 실행하는 것이 좋습니다.

# 방화벽 허용
beacon> powershell New-NetFirewallRule -DisplayName "8080-In" -Direction Inbound -Protocol TCP -Action Allow -LocalPort 8080

# 비콘 8080 포트로 들어오는 트래픽을 진단 로컬 80 포트로 연결
beacon> rportfwd 8080 127.0.0.1 80

# 방화벽 삭제
beacon> powershell Remove-NetFirewallRule -DisplayName "8080-In"
# 방화벽 허용
beacon> powershell New-NetFirewallRule -DisplayName "8080-In" -Direction Inbound -Protocol TCP -Action Allow -LocalPort 8080

# 피벗 8080 으로 들어오는 트래픽을 진단 로컬 80 포트로 연결
ssh -R 127.0.0.1:8080:<Attacker IP>:80 user@<Target IP>
- Attacker IP : 0.0.0.0
- Target IP : 1.1.2.2

# 방화벽 삭제
beacon> powershell Remove-NetFirewallRule -DisplayName "8080-In"
리모트 포트 포워딩