当前位置:网站首页>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
边栏推荐
- In depth understanding of prototype drawings
- MySQL optimization
- St-link connection error invalid ROM table of STM32 difficult and miscellaneous diseases
- Deep understanding of JVM
- Analysis of the use of comparable, comparator and clonable interfaces
- Shortcut key to comment code and cancel code in idea
- OpenCV3 6.2 低通滤波器的使用
- 路由基础—动态路由
- Matlab-其它
- 文件上传-upload-labs
猜你喜欢

ARP及ARP欺骗

sqli-labs(POST类型注入)

Method recursion (Fibonacci sequence, frog jumping steps, tower of Hanoi problem)

Web安全--核心防御机制

Rotating linked list (illustration)

OpenCV3 6.3 用滤波器进行缩减像素采样

Vs code configuration problem

Carla-ue4editor import Roadrunner map file (nanny level tutorial)

sqli-labs第1关

Classes and objects (instantiation of classes and classes, this, static keyword, encapsulation)
随机推荐
[untitled]
Carsim 学习心得-粗略翻译1
Opencv's experience of confusing X and Y coordinates
顺序表基本功能函数的实现
Matlab-其它
c语言自定义类型枚举,联合(枚举的巧妙使用,联合体大小的计算)
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
Matlab other
C language replaces spaces in strings with%20
Comparable,Comparator,Clonable 接口使用剖析
C language custom types - structure, bit segment (anonymous structure, self reference of structure, memory alignment of structure)
Solid principle: explanation and examples
双向链表的实现(双向链表与单向链表的简单区别联系和实现)
Makefile基本原理
ICMP Protocol
How to uninstall SQL Server cleanly
程序猿学英语-Learning C
Static library and dynamic library
Installation and use of simple packaging tools
Use of opencv3 6.2 low pass filter