当前位置:网站首页>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
边栏推荐
- 程序猿学英语-Learning C
- Matlab-其它
- Chrome debugging
- Rotating linked list (illustration)
- 类和对象(类和类的实例化,this,static关键字,封装)
- Use the numbers 5, 5, 5, 1 to perform four operations. Each number should be used only once, and the operation result value is required to be 24
- Use the kaggle training model and download your own training model
- Web安全--核心防御机制
- How to apply for a secondary domain name?
- Routing foundation - dynamic routing
猜你喜欢

Getting started with k8s: building MySQL with Helm

CarSim learning experience - rough translation 1

C language replaces spaces in strings with%20

C language custom type enumeration, Union (clever use of enumeration, calculation of union size)

Detailed explanation of NIN network

IP protocol and IP address

Valin cable: BI application promotes enterprise digital transformation

HCIA - data link layer

Openfeign is easy to use

Carla-UE4Editor导入RoadRunner地图文件(保姆级教程)
随机推荐
What is SQL injection
Use the numbers 5, 5, 5, 1 to perform four operations. Each number should be used only once, and the operation result value is required to be 24
Comparable,Comparator,Clonable 接口使用剖析
【无标题】
The best blog to explain the basics of compilation (share)
Intelligent manufacturing solutions digital twin smart factory
Generate database documents with one click, which can be called swagger in the database industry
Pointer initialization
Learning C
C language implements XML generation and parsing library (XML extension)
2022 Heilongjiang latest construction eight members (materialman) simulated examination questions and answers
When a custom exception encounters reflection
k8s入门:Helm 构建 MySQL
Use Wireshark to grab TCP three handshakes
Programming ape learning English - imperative programming
One of the reasons for WCF update service reference error
C language custom types - structure, bit segment (anonymous structure, self reference of structure, memory alignment of structure)
Opencv3 6.3 reduced pixel sampling with filters
Longest isometric subsequence
STM32 new project (refer to punctual atom)