当前位置:网站首页>端口转发小结
端口转发小结
2022-07-27 05:48:00 【ailx10】
端口转发,也有人叫端口反弹,简单的很,总结了10个端口转发小技巧,其实就是A能访问B,B能访问C,但是A不能访问C,端口转发就是让A能访问C,举个不恰当的例子:
情景:小黑能够访问和控制跳板机,跳板机能访问手机
考验:请帮小黑直接访问手机
我们发现,除了SSH本地转发在本地操作,其他9个端口转发都是在跳板机上操作,所以请记住,端口转发通常都是发生在跳板机上,从安全事件的角度来看,跳板机就是失陷主机,需要重点排查~

1、在本地操作
2、ssh -CfNg -L <本地端口>:<受害者IP>:<受害者端口> <跳板机SSH>
3、访问本地端口1、在跳板机操作
2、ssh -CfNg -R <跳板机端口>:<受害者IP>:<受害者端口> <本地SSH>
3、访问跳板机端口1、在跳板机操作
2、0.0.0.0 <跳板机端口> <受害者IP> <受害者端口>
3、rinetd -c /etc/rinetd.conf
4、访问跳板机端口1、在跳板机操作
2、iptables -t nat -A PREROUTING -p tcp --dport <跳板机端口> -j DNAT --to-destination <受害者IP>:<受害者端口>
3、iptables -t nat -A POSTROUTING -p tcp -d <受害者IP>> --dport <受害者端口> -j SNAT --to-source <跳板机IP>
4、访问跳板机端口1、在跳板机操作
2、firewall-cmd --permanent --add-forward-port=port=<跳板机端口>:proto=tcp:toaddr=<受害者IP>:toport=<受害者端口>
3、firewall-cmd --reload
4、访问跳板机端口1、在跳板机操作
2、-A PREROUTING -p tcp --dport <跳板机端口> -j DNAT --to-destination <受害者IP>:<受害者端口>
3、-A POSTROUTING -p tcp -d <受害者IP> --dport <受害者端口> -j SNAT --to-source <跳板机IP>
4、访问跳板机端口1、在跳板机操作
2、nc -lp <跳板机端口> -c "nc <受害者IP> <受害者端口>"
3、访问跳板机端口1、在跳板机操作
2、socat TCP-LISTEN:<跳板机端口>,reuseaddr,fork TCP:<受害者IP>:<受害者端口>
3、访问跳板机端口1、在跳板机操作
2、./portmap -m 1 -p1 <跳板机端口> -h2 <受害者IP> -p2 <受害者端口>
3、访问跳板机端口1、在跳板机操作
2、./nb -tran <跳板机端口> <受害者IP>:<受害者端口>
3、访问跳板机端口网络安全任重道远,洗洗睡吧~

边栏推荐
- Analysis of strong tennis cup 2021 PWN competition -- babypwn
- 从技术原理看元宇宙的可能性:Omniverse如何“造”火星
- Norms of vectors and matrices
- 泛型 -- 学会它,好处多多
- Hospital reservation management system based on SSM
- 指令集董事长潘爱民出席2022 ECUG Con,为中国技术力量发声
- Dajiang livox customized format custommsg format conversion pointcloud2
- 用typescript实现排序-递增
- Vscode creates golang development environment and debug unit test of golang
- Pytorch model
猜你喜欢

Watermelon book learning Chapter 5 --- neural network

MangoDB

Analysis on the current situation and optimization strategy of customer experience management in banking industry

Cass11.0.0.4 for autocad2010-2023 dog free usage

Web configuration software for industrial control is more efficient than configuration software

Music website management system based on SSM

String类的用法

Derivative, partial derivative and gradient

The vscode run command reported an error: the mark "&" is not a valid statement separator in this version.

基于SSM医院预约管理系统
随机推荐
What is OKR and what is the difference between OKR and KPI
Watermelon book chapter 3 - linear model learning notes
Dimension problems and contour lines
Go obtains the processing results of goroutine through channel
Hospital reservation management system based on SSM
Two ways of multi GPU training of pytorch
DNA偶联PbSe量子点|近红外硒化铅PbSe量子点修饰脱氧核糖核酸DNA|PbSe-DNA QDs
Golang encapsulates the packages involved in MySQL and the differences between sqlx and Gorm
Basic concepts of program, process, thread, coprocess, single thread and multi thread
MySQL index failure and solution practice
PNA肽核酸修饰多肽Suc-Tyr-Leu-Val-pNA|Suc-Ala-Pro-Phe-pNA 11
Es compares the data difference between the two indexes
Interpretation of deepsort source code (II)
AI:业余时间打比赛—挣它个小小目标—【阿里安全×ICDM 2022】大规模电商图上的风险商品检测比赛
Codeforces Round #809 (Div. 2)(6/6)(Kruskal重构树)
PNA修饰多肽ARMS-PNA|PNA-DNA|suc-AAPF-pNA|Suc-(Ala)3-pNA
Why can cross entropy loss be used to characterize loss
DNA(脱氧核糖核酸)供应|碳纳米管载核酸-DNA/RNA材料|DNA/RNA核酸修饰磁性纳米颗粒
Digital image processing - Chapter 6 color image processing
Drools(5):Drools基础语法(3)