[20230309]nc reverse bash shell or cmd.exe(windows).txt
--//nc 是网络利器,以前曾经做过[20210908]Reverse Shell with Bash.txt=>http://blog.itpub.net/267265/viewspace-2790933/。
--//最近看了这方面内容,测试reserver bash shell or cmd.exe(windows)以及端口转发,代理:
1.环境:
--//首先找2,3台机器,千万不要在生产系统做这样的测试!!
192.168.100.78 linux (Oracle Linux Server release 5.9)
192.168.98.6 windows
192.168.100.235 linux (Red Hat Enterprise Linux Server release 7.5 )
--//注: 192.168.100.235 的nc版本高一些,支持更多的参数选择.另外我发现两台机器nc的来源不一样,做一下说明,我估计最新版本的机器
--//都是来自nmap包,支持的参数有一点点乱!!
--//192.168.100.78的nc版本.
$ rpm -qif $(which nc)
Name : nc Relocations: (not relocatable)
Version : 1.84 Vendor: Oracle USA
Release : 10.fc6 Build Date: Wed 06 Jun 2007 07:33:51 PM CST
Install Date: Fri 29 Aug 2014 09:27:41 PM CST Build Host: ca-build14
Group : Applications/Internet Source RPM: nc-1.84-10.fc6.src.rpm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Size : 111823 License: GPL
Signature : DSA/SHA1, Fri 08 Jun 2007 08:19:28 AM CST, Key ID 66ced3de1e5e0159
URL : http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/
Summary : Reads and writes data across network connections using TCP or UDP.
--//192.168.100.235的nc版本.
$ rpm -qif $(which nc)
Name : nmap-ncat
Epoch : 2
Version : 6.40
Release : 13.el7
Architecture: x86_64
Install Date: Tue 10 Nov 2020 07:39:27 PM CST
Group : Applications/System
Size : 432699
License : GPLv2 and LGPLv2+ and GPLv2+ and BSD
Signature : RSA/SHA256, Sun 28 Jan 2018 09:04:52 PM CST, Key ID 72f97b74ec551f03
Source RPM : nmap-6.40-13.el7.src.rpm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build Date : Sun 28 Jan 2018 09:04:38 PM CST
Build Host : x86-ol7-builder-01.us.oracle.com
Relocations : (not relocatable)
Vendor : Oracle America
URL : http://nmap.org/
Summary : Nmap's Netcat replacement
~~~~~~~~~~~~