freeBuf
主站

分类

漏洞 工具 极客 Web安全 系统安全 网络安全 无线安全 设备/客户端安全 数据安全 安全管理 企业安全 工控安全

特色

头条 人物志 活动 视频 观点 招聘 报告 资讯 区块链安全 标准与合规 容器安全 公开课

点我创作

试试在FreeBuf发布您的第一篇文章 让安全圈留下您的足迹
我知道了

官方公众号企业安全新浪微博

FreeBuf.COM网络安全行业门户,每日发布专业的安全资讯、技术剖析。

FreeBuf+小程序

FreeBuf+小程序

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

hack the box之Spectra
securitysun 2021-04-15 18:23:47 452998

Spectra介绍

1618467554_6077dae257c04e794e2a8.png!small?1618467550396

探测

1618467895_6077dc37463ccdf841be5.png!small?1618467891159

访问10.10.10.229:80端口

1618467969_6077dc81665b168204d31.png!small?1618467965245

找到spectra.htb and www.spectra.htb反向代理

http://spectra.htb/main/
http://www.spectra.htb/testing/index.php

在/etc/hosts中添加spectra.htb

1618468247_6077dd97b448ed890b382.png!small?1618468243634

再用目录猜解工具gobuster扫域名,这是一个扫描目录文件、DNS和VHost爆破工具。

1618468463_6077de6fea6be4bb793e5.png!small?1618468459805

进一步的

1618468484_6077de84af0fbf95face8.png!small?1618468480604

1618468527_6077deaf144f51a099ff0.png!small?1618468522993

testing路径下有一些php文件,我们主要看看有没有一些配置信息。

1618468613_6077df05261b0179e2812.png!small?1618468609101

发现wp-config.php.save文件里有配置信息,发现了数据库用户名密码

1618468713_6077df694eb8ceee56247.png!small?1618468709297

1618468770_6077dfa24608f2820d685.png!small?1618468766173

发现不允许这个ip链接数据库。再用administrator / devteam01尝试登录

1618468911_6077e02f6f5f85b6a7e96.png!small?16184689073211618468873_6077e0096b417f7910bb2.png!small?1618468869399

发现是wordpress 5.4.2版本。

渗透测试反弹shell

访问访问管理员面板后,可以创建反弹shell。

下载php反弹代码:http://pentestmonkey.net/tools/php-reverse-shell/php-reverse-shell-1.0.tar.gz

在如下页面填写代码

1618469122_6077e1028f20f50e58075.png!small?1618469119311

1618469138_6077e1121dac76613bfd1.png!small?1618469134675

还可以参考下面链接

https://www.hackingarticles.in/wordpress-reverse-shell/

https://rioasmara.com/2019/02/25/penetration-test-wordpress-reverse-shell/


kali监听

1618469276_6077e19c13e9d3acb7052.png!small?1618469272032

访问已编辑php页面 http://spectra.htb/main/wp-content/themes/twentyseventeen/404.php

反弹shell

1618469394_6077e212f213c3fc0e699.png!small?1618469390860

1618469438_6077e23e17e29fe2d981b.png!small?1618469433966


1618469574_6077e2c6494f86b7a0e3d.png!small?1618469570282

1618469879_6077e3f796c35584031ee.png!small?1618469875502

输出

1618469916_6077e41c87375f5abbbc1.png!small?1618469912408

继续访问数据库

mysql -D dev --user dev -p development01 超时了

mysql -D dev --user devtest -p devteam01 连接被拒绝

更多输出信息

1618469985_6077e4615f475f1b92a77.png!small?1618469981426

https://pentestlab.blog/2017/09/25/suid-executables/

https://unix.stackexchange.com/questions/116792/privileged-mode-in-bash


bash信息

1618470047_6077e49fe51d85610f673.png!small?1618470043799

1618470061_6077e4ade1693e947d746.png!small?1618470058609

结束

OVER

# 渗透测试 # 漏洞分析 # 网络安全技术
本文为 securitysun 独立观点,未经授权禁止转载。
如需授权、对文章有疑问或需删除稿件,请联系 FreeBuf 客服小蜜蜂(微信:freebee1024)
被以下专辑收录,发现更多精彩内容
+ 收入我的专辑
+ 加入我的收藏
日志审计与APT
securitysun LV.4
金黄色的落叶堆满心间
  • 35 文章数
  • 24 关注者
hyperscan在IDS和IPS产品中的应用
2022-07-11
畸形报文单包攻击检测防御原理
2022-01-08
DNS Flood类型攻防梳理和思考
2021-12-22
文章目录