当前位置:网站首页>HackTheBox-Gunship
HackTheBox-Gunship
2022-07-02 08:34:00 【galaxy3000】
List of articles
summary
HackTheBox Website CTF shooting range Web Related topics Gunship, Title address https://app.hackthebox.com/challenges/gunship, Main investigation AST Injected knowledge points .

subject
Title Overview
The title provides attachment download , After decompression, as shown in the figure 
After opening the program instance , Prompt to visit 138.68.142.134:32761, visit http://138.68.142.134:32761, See the following Web Interface 

Their thinking
Using browser plug-ins Wappalyzer View its components , Found as Node.js Developed applications 
see routes Under the index.js
const path = require('path');
const express = require('express');
const pug = require('pug');
const { unflatten } = require('flat');
const router = express.Router();
router.get('/', (req, res) => {
return res.sendFile(path.resolve('views/index.html'));
});
router.post('/api/submit', (req, res) => {
const { artist } = unflatten(req.body);
if (artist.name.includes('Haigh') || artist.name.includes('Westaway') || artist.name.includes('Gingell')) {
return res.json({
'response': pug.compile('span Hello #{user}, thank you for letting us know!')({ user: 'guest' })
});
} else {
return res.json({
'response': 'Please provide us with the full name of an existing member.'
});
}
});
module.exports = router;
see package.json Version corresponding to each component 
among pug:3.0.0 There is RCE Loophole , See https://github.com/pugjs/pug/issues/3312

stay index.js Can be seen in , Request for POST Mode submission , adopt req.body Receiving parameters .
Question answer
Use postman Send to get flag
边栏推荐
- Analysis of the use of comparable, comparator and clonable interfaces
- Carsim problem failed to start Solver: Path Id Obj (X) was set to y; Aucune valeur de correction de xxxxx?
- Learn to write article format
- File upload and download performance test based on the locust framework
- sqli-labs第2关
- Getting started with k8s: building MySQL with Helm
- Realize bidirectional linked list (with puppet node)
- Web安全--核心防御机制
- On November 24, we celebrate the "full moon"
- Use Wireshark to grab TCP three handshakes
猜你喜欢

c语言自定义类型枚举,联合(枚举的巧妙使用,联合体大小的计算)

旋转链表(图解说明)

16: 00 interview, came out at 16:08, the question is really too

Carsim problem failed to start Solver: Path Id Obj (X) was set to y; Aucune valeur de correction de xxxxx?

OpenFeign 简单使用

Hcia - Application Layer

C language implements XML generation and parsing library (XML extension)

Web安全--核心防御机制

Routing foundation - dynamic routing

Use of OpenCV 6.4 median filter
随机推荐
TCP/IP—传输层
Flex layout
Sentinel 简单使用
c语言将字符串中的空格替换成%20
Use Wireshark to grab TCP three handshakes
zipkin 简单使用
使用wireshark抓取Tcp三次握手
Vs code configuration problem
Smart agriculture solutions smart agriculture system development
Mutex
OpenFeign 簡單使用
Carsim 学习心得-粗略翻译1
HCIA—應用層
路由基础—动态路由
STL quick reference manual
c语言自定义类型——结构体,位段(匿名结构体,结构体的自引用,结构体的内存对齐)
Force deduction method summary: find classes
Comparable,Comparator,Clonable 接口使用剖析
Constant pointer and pointer constant
HCIA—应用层