栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

[SUCTF 2019]Pythonginx 1(nginx)

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

[SUCTF 2019]Pythonginx 1(nginx)

1.2019black hat一个议题
PPT https://i.blackhat.com/USA-19/Thursday/us-19-Birch-HostSplit-Exploitable-Antipatterns-In-Unicode-Normalization.pdf
这也就是说我们传入的url为http://evil.c℀.com在经过上述处理过后便成为了http://evil.ca/c.com
在unicode中字符℀(U 2100) 当IDNA处理此字符时 会将℀变成a/c 因此当你访问此url时 dns服务器会自动将url重定向到另一个网站。如果服务器引用前端url时 只对域名做了限制 那么通过这种方法 我们就可以轻松绕过服务器对域名的限制了。

2.nginx重要文件位置
配置文件存放目录 /etc/nginx
主配置文件 /etc/nginx/conf/nginx.conf
管理脚本 /usr/lib64/systemd/system/nginx.service
模块 /usr/lisb64/nginx/modules
应用程序 /usr/sbin/nginx
程序默认存放位置 /usr/share/nginx/html
日志默认存放位置 /var/log/nginx
配置文件目录为 /usr/local/nginx/conf/nginx.conf

3.脚本

from urllib.parse import urlparse,urlunsplit,urlsplit
from urllib import parse
def get_unicode():
 for x in range(65536):
 uni chr(x)
 url http://suctf.c{} .format(uni)
 try:
 if getUrl(url):
 print( str: uni unicode: \u str(hex(x))[2:])
 except:
 pass
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/267532.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号