检测格式化字符串攻击脚本
来源:互联网 发布:淘宝平铺白底图怎么弄 编辑:程序博客网 时间:2024/04/29 02:03
'''#------------------------ used for inspect_formatstring_flaw -------------------------def inspect_format_attack(): print "detecting format attack..........................." for index in range(0, len(content)): needoutput = False if content[index].count("%") > 4: #find quotes contains char '%' line = content[index] pos1 = line.index('%') begin = pos1 end = pos1 while begin >= 0 and line[begin] != '"': begin = begin - 1 while end < len(line) and line[end] != '"': end = end + 1 if begin != -1 and end > begin: formatstring = line[begin + 1 : end] formatnum = formatstring.count("%") formatnum = formatnum - formatstring.count("%%") formatnum = formatnum + formatstring.count("%ld") #tranverse the params and validate them, first find the next ',' begin = line[end :].find(',') if begin == -1: needoutput = True else: line = line[begin + end :] nindex = index + 1 #if seperated in several lines while line.count(";") == 0: line = line + content[nindex] nindex = nindex + 1 pos1 = line.find(';') line = line[: pos1] if line.count(',') < formatnum: needoutput = True #IDA failed to recognize more arguments means there may be a format-string attack if needoutput: print "\t%d %s"%(index, content[index])'''
0 0
- 检测格式化字符串攻击脚本
- 什么是格式化字符串攻击?
- 格式化字符串漏洞攻击
- 【分析】Windows 2000 中的格式化字符串攻击
- 格式化字符串攻击原理及示例
- 格式化字符串攻击原理及示例
- 格式化字符串攻击原理及示例
- 格式化字符串攻击原理及示例
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- SQL注入技术和跨站脚本攻击的检测
- 初来乍到,树立目标,重新开始
- PackageInstaller源码分析(二)
- 【Apache ZooKeeper】命令行zkCli.sh使用指南
- 网安project 密码管理器实现
- Thread多线程(一)
- 检测格式化字符串攻击脚本
- uva11168 Airport(凸包)
- 编译linux内核入门
- Intellij IDEA 中JAR包的导出
- EventBus集成和使用
- android录制视频实现
- [LeetCode-Java]11. Container With Most Water
- 音乐推荐&Audioscrobbler数据集
- 在LCD1602上面显示DS1302掉电时钟和日期