bWAPP----HTML OS Command Injection - Blind
OS Command Injection - Blind
先上代码,他判断了win还是linux然后进行了ping但是结果并没有返回。
1 <div id="main">
2
3 <h1>OS Command Injection - Blind</h1>
4
5 <form action="<?php echo($_SERVER["SCRIPT_NAME"]);?>" method="POST">
6
7 <p>
8
9 <label for="target">Enter your IP address:</label>
10 <input type="text" id="target" name="target" value="">
11
12 <button type="submit" name="form" value="submit">PING</button>
13
14 </p>
15
16 </form>
17 <?php
18
19 if(isset($_POST["target"]))
20 {
21
22 $target = $_POST["target"];
23
24 if($target == "")
25 {
26
27 echo "<font color=\"red\">Please enter your IP address...</font>";
28
29 }
30
31 else
32 {
33
34 echo "Did you captured our GOLDEN packet?";
35
36 if(PHP_OS == "Windows" or PHP_OS == "WINNT" or PHP_OS == "WIN32")
37 {
38
39 // Debugging
40 // echo "Windows!";
41
42 // Increasing the PING count will slow down your web scanner!
43 shell_exec("ping -n 1 " . commandi($target));
44
45 }
46
47 else
48 {
49
50 // Debugging
51 // echo "Not Windows!";
52
53 // Increasing the PING count will slow down your web scanner!
54 shell_exec("ping -c 1 " . commandi($target));
55
56 }
57
58 }
59
60 }
61
62 ?>
63
64 </div>
看反应时间,没有任何ping,只是返回一个信息,服务器的执行速度最快 
当服务器正常ping一次后,反应是17

当有命令注入时,多执行了一个命令,所以反应的时间会长,是25

如果是错误命令,服务器不执行,时间会在两者之间。

根据时间的长短就能判断服务器是否执行了注入的命令
防御代码与 上一个命令注入相同。
bWAPP----HTML OS Command Injection - Blind的更多相关文章
- Portswigger web security academy:OS command injection
Portswigger web security academy:OS command injection 目录 Portswigger web security academy:OS command ...
- bWAPP----OS Command Injection
OS Command Injection 界面: 给一个域名,它帮你返回DNS 代码: 1 <div id="main"> 2 3 <h1>OS Comma ...
- DVWA之命令注入(command injection)
Command injection就是指通过提交恶意构造的参数破坏命令语句结构,从而达到执行恶意命令的目的 LOW 无论是Windows还是Linux,都可以使用&&连接多个命令 执行 ...
- DVWA Command Injection 通关教程
Command Injection 介绍 命令注入(Command Injection),对一些函数的参数没有做过滤或过滤不严导致的,可以执行系统或者应用指令(CMD命令或者bash命令)的一种注入攻 ...
- DVWA Command Injection 解析
命令注入,即 Command Injection.是指通过提交恶意构造的参数破坏命令语句结构,从而达到执行恶意命令的目的. 在Web应用中,有时候会用到一些命令执行的函数,如php中system.ex ...
- DWVA-命令注入漏洞闯关(Command Injection)
前言 Vulnerability: Command Injection LOW级别 代码: <?php if( isset( $_POST[ 'Submit' ] ) ) { // 几首一个变量 ...
- DVWA之Command Injection
Command Injection Command Injection,即命令注入,是指通过提交恶意构造的参数破坏命令语句结构,从而达到执行恶意命令的目的.PHP命令注入攻击漏洞是PHP应用程序中常见 ...
- DVWA(四):Command Injection 全等级命令注入
Command Injection : 命令注入(Command Injection),对一些函数的参数没有做好过滤而导致用户可以控制输入的参数,使其恶意执行系统命令或这cmd.bash指令的一种注入 ...
- DVWA靶场之Command Injection(命令行注入)通关
Command Injection Low: <?php if( isset( $_POST[ 'Submit' ] ) ) { // Get input $target = $_REQUES ...
随机推荐
- git学习(一) 入门级命令
git 本地操作 调出Git的帮助文档 git --help 查看某个具体命令的帮助文档 git +命令 --help 查看git的版本 git --version 生成空的本地仓库 git init ...
- 初学 Python 需要安装哪些软件?
自动配置.有效求助.协作编程.版本控制.一站式解决 Python 新手练习中的痛点. 痛点 这个学期,我在北得克萨斯大学(University of North Texas)教 INFO 5731: ...
- ubuntu 16.04 Chrome
打开终端 输入 命令1:sudo wget http://www.linuxidc.com/files/repo/google-chrome.list -P /etc/apt/sources.list ...
- Git高级使用教程
Git 与 SVN 区别 Git是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目.Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的 ...
- No compatible servers were found,You'll need to cancel this wizard and install one!
原文链接:https://www.jianshu.com/p/a11f93fb16ce 问题原因 笔记本重装的windows系统,重新安装mysql的时候,显示错误,看了一下缺失服务,实际上可能是缺少 ...
- 一篇理解什么是CanSet, CanAddr?
什么是可设置( CanSet ) 首先需要先明确下,可设置是针对 reflect.Value 的.普通的变量要转变成为 reflect.Value 需要先使用 reflect.ValueOf() 来进 ...
- python基础二:循环
python 中循环的方式有两种: 一,for 循环 单向循环 可以用来遍历字符串,列表,元组,字典等 for value in 被遍历对象: print(value) 遍历字典dict的时候稍有不 ...
- 配置kuernetes集群pod拉取私有镜像仓库中的镜像
目录 1 背景说明 2 实现方法 3 具体实现 配置镜像仓库项目为公开类型(任何人可以访问) 配置docker-registry类型的secret(pod使用secret获取镜像认证) 通过账户名密码 ...
- 群晖DS218+部署kafka
欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...
- pip intsall 遇到的各种问题
一.pip install 安装指定版本的包 要用pip 安装指定版本的python的包,只需要通过 == 操作符指定. pip install robotframework == 2.8.7 将安装 ...