๋ก์ปฌ์ ์ธํฐ๋ท์ ๋ ธ์ถํ๊ธฐ
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
์ด ํ์ด์ง์ ๋ชฉํ๋ ์ ์ด๋ ๋ก์ปฌ raw TCP ports์ ๋ก์ปฌ ์น(HTTP)์ ๋ค๋ฅธ ์๋ฒ์ ์๋ฌด๊ฒ๋ ์ค์นํ ํ์ ์์ด(ํ์ํ๋ค๋ฉด ๋ก์ปฌ์๋ง ์ค์น) ์ธํฐ๋ท์ ๋ ธ์ถํ ์ ์๋ ๋์์ ์ ์ํ๋ ๊ฒ์ ๋๋ค.
Serveo
From https://serveo.net/, https://serveo.net/์์๋ ์ฌ๋ฌ http ๋ฐ port forwarding ๊ธฐ๋ฅ์ ๋ฌด๋ฃ๋ก ์ ๊ณตํฉ๋๋ค.
# Get a random port from serveo.net to expose local port 4444
ssh -R 0:localhost:4444 serveo.net
# Expose a web listening in localhost:300 in a random https URL
ssh -R 80:localhost:3000 serveo.net
SocketXP
https://www.socketxp.com/download์์ tcp์ http๋ฅผ ๋ ธ์ถํ ์ ์์ต๋๋ค:
# Expose tcp port 22
socketxp connect tcp://localhost:22
# Expose http port 8080
socketxp connect http://localhost:8080
Ngrok
https://ngrok.com/์ ํตํด http ๋ฐ tcp ํฌํธ๋ฅผ ์ธ๋ถ์ ๋ ธ์ถํ ์ ์์ต๋๋ค:
# Expose web in 3000
ngrok http 8000
# Expose port in 9000 (it requires a credit card, but you won't be charged)
ngrok tcp 9000
Telebit
https://telebit.cloud/์์ http ๋ฐ tcp ํฌํธ๋ฅผ ๋ ธ์ถํ ์ ์์ต๋๋ค:
# Expose web in 3000
/Users/username/Applications/telebit/bin/telebit http 3000
# Expose port in 9000
/Users/username/Applications/telebit/bin/telebit tcp 9000
LocalXpose
https://localxpose.io/์์ ์ฌ๋ฌ http ๋ฐ ํฌํธ ํฌ์๋ฉ ๊ธฐ๋ฅ์ ๋ฌด๋ฃ๋ก ์ ๊ณตํฉ๋๋ค.
# Expose web in port 8989
loclx tunnel http -t 8989
# Expose tcp port in 4545 (requires pro)
loclx tunnel tcp --port 4545
Expose
https://expose.dev/๋ http ๋ฐ tcp ํฌํธ๋ฅผ ๋ ธ์ถํ ์ ์์ต๋๋ค:
# Expose web in 3000
./expose share http://localhost:3000
# Expose tcp port in port 4444 (REQUIRES PREMIUM)
./expose share-port 4444
Localtunnel
https://github.com/localtunnel/localtunnel์์ http๋ฅผ ๋ฌด๋ฃ๋ก ๋ ธ์ถํ ์ ์์ต๋๋ค:
# Expose web in port 8000
npx localtunnel --port 8000
Cloudflare Tunnel (cloudflared)
Cloudflare์ cloudflared CLI๋ ๋น ๋ฅธ ๋ฐ๋ชจ๋ฅผ ์ํ ์ธ์ฆ ์๋ โQuickโ ํฐ๋์ด๋ ๋ณธ์ธ์ ๋๋ฉ์ธ/ํธ์คํธ๋ช
์ ๋ฐ์ธ๋ฉ๋ ๋ช
๋ช
๋ ํฐ๋์ ์์ฑํ ์ ์์ต๋๋ค. HTTP(S) reverse proxies์ Cloudflare์ edge๋ฅผ ํตํด ๋ผ์ฐํ
๋๋ raw TCP mappings๋ ์ง์ํฉ๋๋ค.
# Quick Tunnel exposing localhost:8080 (random trycloudflare subdomain)
cloudflared tunnel --url http://localhost:8080
# Named tunnel bound to a DNS record
cloudflared tunnel login # one-time device auth
cloudflared tunnel create my-tunnel
cloudflared tunnel route dns my-tunnel app.example.com
cloudflared tunnel run my-tunnel --config tunnel.yml
Named tunnels์ ์ฌ์ฉํ๋ฉด tunnel.yml ์์ ์ฌ๋ฌ ๊ฐ์ ingress ๊ท์น(HTTP, SSH, RDP ๋ฑ)์ ์ ์ํ ์ ์๊ณ , Cloudflare Access๋ฅผ ํตํด ์๋น์ค๋ณ ์ ๊ทผ ์ ์ฑ
์ ์ง์ํ๋ฉฐ ์์์ฑ์ ์ํด systemd ์ปจํ
์ด๋๋ก ์คํํ ์ ์์ต๋๋ค. Quick Tunnels์ ์ต๋ช
์ด๊ณ ์ผ์์ ์ด์ด์ phishing payload staging์ด๋ webhook ํ
์คํธ์ ์ ํฉํ์ง๋ง, Cloudflare๋ ๊ฐ๋ ์๊ฐ์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
Tailscale Funnel / Serve
Tailscale v1.52+๋ ํตํฉ๋ tailscale serve(tailnet ๋ด๋ถ์์ ๊ณต์ )์ tailscale funnel(์ธํฐ๋ท์ ๊ณต๊ฐ) ์ํฌํ๋ก์ฐ๋ฅผ ์ ๊ณตํฉ๋๋ค. ๋ ๋ช
๋ น ๋ชจ๋ ์๋ TLS์ ์งง์ *.ts.net ํธ์คํธ๋ช
์ ์ฌ์ฉํด HTTP(S)๋ฅผ reverse proxyํ๊ฑฐ๋ raw TCP๋ฅผ forwardํ ์ ์์ต๋๋ค.
# Share localhost:3000 within the tailnet
sudo tailscale serve 3000
# Publish it publicly on port 443 with Funnel
sudo tailscale funnel --https=443 localhost:3000
# Forward raw TCP (expose local SSH)
sudo tailscale funnel --tcp=10000 tcp://localhost:22
--bg๋ฅผ ์ฌ์ฉํ๋ฉด ํฌ๊ทธ๋ผ์ด๋ ํ๋ก์ธ์ค๋ฅผ ์ ์งํ์ง ์๊ณ ๋ ๊ตฌ์ฑ์ ์ง์ํ ์ ์์ผ๋ฉฐ, tailscale funnel status๋ก ๊ณต๊ฐ ์ธํฐ๋ท์์ ์ ๊ทผ ๊ฐ๋ฅํ ์๋น์ค๋ฅผ ๊ฐ์ฌํ ์ ์์ต๋๋ค. Funnel์ ๋ก์ปฌ ๋
ธ๋์์ TLS๋ฅผ ์ข
๋ฃํ๋ฏ๋ก ์ธ์ฆ ์ ๋ณด ์
๋ ฅ ์์ฒญ, ํค๋, ๋๋ mTLS ์ ์ฉ์ ์ฌ์ ํ ๊ทํ์ ํต์ ํ์ ๋จ์ ์์ ์ ์์ต๋๋ค.
Fast Reverse Proxy (frp)
frp๋ rendezvous ์๋ฒ(frps)์ ํด๋ผ์ด์ธํธ(frpc)๋ฅผ ์ง์ ์ ์ดํ๋ self-hosted ์ต์
์
๋๋ค. ์ด๋ฏธ VPS๋ฅผ ๋ณด์ ํ๊ณ ์๊ณ ์์ธก ๊ฐ๋ฅํ ๋๋ฉ์ธ/ํฌํธ๋ฅผ ์ํ๋ red teams์ ์ ํฉํฉ๋๋ค.
์ํ frps/frpc ๊ตฌ์ฑ
```bash # Server: bind TCP/HTTP entry points and enable dashboard ./frps -c frps.tomlClient: forward local 22 to remote port 6000 and a web app to vhost
./frpc -c <<โEOFโ serverAddr = โc2.example.comโ serverPort = 7000
[[proxies]] name = โsshโ type = โtcpโ localIP = โ127.0.0.1โ localPort = 22 remotePort = 6000
[[proxies]] name = โpanelโ type = โhttpโ localPort = 8080 customDomains = [โpanel.example.comโ] EOF
</details>
์ต๊ทผ ๋ฆด๋ฆฌ์ค๋ QUIC transport, token/OIDC auth, bandwidth caps, health checks, ๋ฐ Go-template-based range mappings๋ฅผ ์ถ๊ฐํ์ต๋๋ค โ ์๋ก ๋ค๋ฅธ ํธ์คํธ์ implants๋ก ๋งคํ๋๋ ์ฌ๋ฌ ๋ฆฌ์ค๋๋ฅผ ์ ์ํ ๋์ฐ๋ ๋ฐ ์ ์ฉํฉ๋๋ค.
## Pinggy (SSH-based)
Pinggy๋ TCP/443์ ํตํด SSH-accessible ํฐ๋์ ์ ๊ณตํ๋ฏ๋ก HTTPS๋ง ํ์ฉํ๋ captive proxies ๋ค์์๋ ์๋ํฉ๋๋ค. ์ธ์
์ ๋ฌด๋ฃ ํฐ์ด์์ 60๋ถ ๋์ ์ง์๋๋ฉฐ, ๋น ๋ฅธ ๋ฐ๋ชจ๋ webhook relays์ฉ์ผ๋ก ์คํฌ๋ฆฝํธํํ ์ ์์ต๋๋ค.
```bash
# Random subdomain exposing localhost:3000 via SSH reverse tunnel
ssh -p 443 -R0:localhost:3000 a.pinggy.io
์ ๋ฃ ํฐ์ด์์๋ ์ปค์คํ ๋๋ฉ์ธ๊ณผ ๋ ์ค๋ ์ ์ง๋๋ ํฐ๋์ ์์ฒญํ ์ ์์ผ๋ฉฐ, ๋ช ๋ น์ ๋ฃจํ๋ก ๊ฐ์ธ ํฐ๋์ ์๋์ผ๋ก ์ฌํ์ฉํ ์๋ ์์ต๋๋ค.
์ํ ์ธํ ๋ฐ OPSEC ๋ ธํธ
๊ณต๊ฒฉ์๋ค์ ์ ์ ๋ ์ผ์์ ํฐ๋๋ง(ephemeral tunneling), ํนํ Cloudflare์ ์ธ์ฆ์ด ํ์ ์๋ trycloudflare.com ์๋ํฌ์ธํธ๋ฅผ ์
์ฉํด Remote Access Trojan ํ์ด๋ก๋๋ฅผ ๋ฐฐ์นํ๊ณ C2 ์ธํ๋ผ๋ฅผ ์๋ํ๊ณ ์์ต๋๋ค. Proofpoint๋ 2024๋
2์ ์ดํ ๋ค์ด๋ก๋ ๋จ๊ณ๋ฅผ ๋จ๊ธฐ TryCloudflare URL๋ก ์ง์ ํด AsyncRAT, Xworm, VenomRAT, GuLoader, Remcos๋ฅผ ์ ํฌํ ์บ ํ์ธ์ ์ถ์ ํ์ผ๋ฉฐ, ์ด๋ก ์ธํด ๊ธฐ์กด์ ์ ์ ์ฐจ๋จ ๋ชฉ๋ก(static blocklists)์ ํจ์ฌ ๋ ํจ๊ณผ์ ์ด๊ฒ ๋์์ต๋๋ค. ํฐ๋๊ณผ ๋๋ฉ์ธ์ ์ฌ์ ์ ์ผ๋ก ์ฃผ๊ธฐ ๊ต์ฒดํ๋ ๊ฒ์ ๊ณ ๋ คํ๋, ์ฌ์ฉ ์ค์ธ tunneler๋ก ํฅํ๋ ์ธ๋ถ DNS ์กฐํ ๊ฐ์ ์งํ๋ฅผ ๋ชจ๋ํฐ๋งํ์ฌ blue-team์ ํ์ง๋ ์ธํ๋ผ ์ฐจ๋จ ์๋๋ฅผ ์กฐ๊ธฐ์ ํฌ์ฐฉํ์ธ์.
์ฐธ๊ณ ์๋ฃ
- Cloudflare Docs - Create a locally-managed tunnel
- Proofpoint - Threat Actor Abuses Cloudflare Tunnels to Deliver RATs
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


