当前位置:网站首页>Command injection of cisp-pte
Command injection of cisp-pte
2022-07-07 01:54:00 【Colorful @ star】
Command the range explanation
In the last article, we explained the practical exercises ( Two ) Explanation , There is a second solution to the command execution , That is, without filtering , There will be an answer soon .

We just use tac To read a file 
Submit , See what happens 
Find out , The answer appears directly , Relevant statements are not filtered , therefore , In the exam , There will also be filtering , Everyone should learn how to bypass , Find out .
Command injection related knowledge explanation
Personally, I think this command injection is the simplest .
Before that, let's learn what commands can be used to read files .
linux There are mainly seven kinds of instructions commonly used to read the contents of files :
cat、tac、nl、more、less、head、tail
cat: Start with the first line , And output all the content
cat file name Display the contents of the file on the screen
cat -n file name Display the contents of the file on the screen , And display the line number
cat -b file name Display the contents of the file on the screen , And display the line number , But the blank line number is not displayed
tac: Show the contents in reverse order from the last line , And output all the content
tac file name Display the contents of the file on the screen , But it starts from the last line and goes forward
tac -s separator file name – from separator Output backward , The output in reverse order does not contain separator, Output to the last line, and then in order separator Previous content output
tac -b -s separator file name – from separator Output backward , The output in reverse order contains separator, Output to the last line, and then in order separator Previous content output
nl: Be similar to cat-n, Output line number when displaying
nl file name ( Namely nl -b t file name ) Use nl The instruction must show the line number , It is mainly about how to display the operation line number
nl -b a file name According to the line Numbers , Blank lines also display line numbers
nl -b t file name According to the line Numbers , Blank lines do not show line numbers ( The default value is )
nl -w Numbers x file name The number of digits occupied by the line number field
nl -n ln file name The line number is displayed at the leftmost end of the space in the front of the field
nl -n rn file name The line number is displayed at the right end of the space in the front of the field , And no more 0
nl -n rz file name The line number is displayed at the right end of the space in the front of the field , And add 0
more: Depending on the window size , Check the contents of the file page by page
more file name
less: and more similar , But its advantage can turn the page forward , And it can search for characters
less file name
head: Show only the first few lines
haed file name – Display the first ten lines of the file
tail: Show only the last few lines
tail file name – Show end of file
Related topics can be set payload:
After testing , following payload Can complete this problem .
127.0.0.1 | less …/key.php
127.0.0.1 | m’or’e …/key.php
127.0.0.1 | tail …/key.php
127.0.0.1 | v’'i …/key.php
127.0.0.1 | c’a’t …/key.php
127.0.0.1 | head …/key.php
127.0.0.1 | nl …/key.php
|od -c …/key.php
|xxd …/key.php
|xxd …/key.php|grep key
|grep “key” …/key.php
|sed -n ‘1,5p’ …/key.php|grep key
The range where relevant orders are executed


Just use the one just now payload try :
127.0.0.1 | m’or’e …/key.php
After testing, this range can be used payload:
127.0.0.1 | v’'i …/key.php
127.0.0.1 | c’a’t …/key.php
127.0.0.1 |xxd …/key.php
127.0.0.1 |grep “key” …/key.php
边栏推荐
- Let's see how to realize BP neural network in Matlab toolbox
- 刨析《C语言》【进阶】付费知识【完结】
- 各种语言,软件,系统的国内镜像,收藏这一个仓库就够了: Thanks-Mirror
- 我如何编码8个小时而不会感到疲倦。
- Google released a security update to fix 0 days that have been used in chrome
- 图片打水印 缩放 和一个输入流的转换
- ROS学习(十九)机器人SLAM功能包——cartographer
- JS how to quickly create an array with length n
- Batch delete data in SQL - set in entity
- 场景实践:基于函数计算快速搭建Wordpress博客系统
猜你喜欢

ROS learning (XX) robot slam function package -- installation and testing of rgbdslam

场景实践:基于函数计算快速搭建Wordpress博客系统

刨析《C语言》【进阶】付费知识【完结】

AcWing 345. 牛站 题解(floyd的性质、倍增)

猫猫回收站

PartyDAO如何在1年内把一篇推文变成了2亿美金的产品DAO

Errors made in the development of merging the quantity of data in the set according to attributes

开发中对集合里面的数据根据属性进行合并数量时犯的错误

Modify the system time of Px4 flight control

Gin 入门实战
随机推荐
Baidu flying general BMN timing action positioning framework | data preparation and training guide (Part 1)
454 Baidu Mianjing 1
Compile command line terminal swift
刨析《C语言》【进阶】付费知识【一】
Use nodejs to determine which projects are packaged + released
Appium foundation - appium inspector positioning tool (I)
New job insights ~ leave the old and welcome the new~
2022/0524/bookstrap
ROS学习(21)机器人SLAM功能包——orbslam的安装与测试
C language instance_ four
C语言【23道】经典面试题【下】
盒子拉伸拉扯(左右模式)
C language instance_ five
Recognition of C language array
字符串转成日期对象
Today's question -2022/7/4 modify string reference type variables in lambda body
454-百度面经1
AcWing 1140. Shortest network (minimum spanning tree)
JVM memory model
Shell script quickly counts the number of lines of project code