当前位置:网站首页>【web源码-代码审计方法】审计技巧及审计工具
【web源码-代码审计方法】审计技巧及审计工具
2022-07-05 03:33:00 【黑色地带(崛起)】
目录
一、审计情况:
1.1、有源码:
通常不包含完整的编译和测试环境,且缺乏必须的关键依赖组件,往往无法构建出可运行的程序
一般只能使用静态分析的方式去进行审计
1.2、有二进制程序:
如 APK、EXE、jar 包、IoT 的系统固件等
通常通过动态分析以及逆向工程的方式进行审计
1.3、有源码、二进制程序:
审计提供了最为有利的访问权限,通常目标是开源软件,包含了完整的构建环境和依赖
1.4、完全黑盒:
只能通过外部接口去进行盲测(较为常见)
二、影响:
2.1、代码语言:
C/C++ 这种内存不安全的语言需要更多关注底层细节
Java、Python 等内存安全的语言则更多关注上层逻辑实现;
2.2、代码风格:
整洁、注释清晰的项目通常比其他项目花费更少时间去审计
三、审计思路
3.1、敏感关键字回溯参数传递
大多数漏洞是由于函数的使用不当造成的
搜索相应敏感关键字,即可快速挖掘想要的漏洞,可定向挖掘,高效、高质量
但是由于没有通读代码,对程序整体架构了解不够深入,在挖掘漏洞时定位利用会花点时间,且对逻辑漏洞挖掘覆盖不到
3.2、接口分析
查找可控变量及其函数,正向追踪变量传递过程
数据入口点,如函数的参数、环境变量等,寻找可被恶意输入触发的安全漏洞
3.3、敏感功能点建模
按功能点分块寻找
文件上传功能、支付功能……
通过行为建模还原模块的抽象行为,并寻找潜在的逻辑和功能漏洞
3.4、全文关键代码
函数集文件:即公共函数文件,通过打开index.php或者一些功能性文件进行寻找
配置文件:一般包含config关键字,会有配置选项、数据库等配置信息
安全过滤文件:一般包含filter、safe、check等关键字
index文件:程序的入口,了解整个程序的架构、运行的流程、包含到的文件
3.5、还原安全边界
通过分析所有安全相关的校验和检查代码
还原开发者或者安全架构师预设的安全边界,从而对还原后安全边界进行进一步审计,构建实际攻击的威胁模型
四、小型源码
代码量一般都不大,相对比较容易找到漏洞
4.1、审计步骤:
(1)输入点:找到各个输入点。
(2)防护措施:找到针对输入的过滤并尝试绕过。
(3)函数漏洞:找到处理输入的函数并查看有无漏洞。
(4)利用:找到漏洞后进行最充分的利用。
五、大型源码
一般都是对CMS型的框架进行审计,主要问题是需要从大量代码中快速定位到漏洞
5.1、审计步骤:
(1)寻找危险函数
(2)向上回溯,寻找可用输入点
(3)绕过针对输入点的过滤
(4)构造触发漏洞
六、审计工具
6.1、Seay源代码审计系统
下载:
链接:https://pan.baidu.com/s/1H51ez9BrYohDP4hXHJLReA?pwd=bgz1
提取码:bgz1
6.2、RIPS
链接:https://pan.baidu.com/s/14RWI64sU8LU-z9qUeVUzBg?pwd=yot6
提取码:yot6
边栏推荐
- Pat grade a 1119 pre- and post order traversals (30 points)
- Idea inheritance relationship
- Learning notes of raspberry pie 4B - IO communication (I2C)
- Eight days of learning C language - while loop (embedded) (single chip microcomputer)
- Acwing game 58 [End]
- Linux Installation redis
- el-select,el-option下拉选择框
- Machine learning experiment report 1 - linear model, decision tree, neural network part
- 040. (2.9) relieved
- Accuracy problem and solution of BigDecimal
猜你喜欢
![[groovy] string (string splicing | multi line string)](/img/c7/2471d13e5d49cca3727d05b4f9fb36.jpg)
[groovy] string (string splicing | multi line string)

this+闭包+作用域 面试题

Devtools的簡單使用

单项框 复选框

Pat class a 1160 forever (class B 1104 forever)

Watch the online press conference of tdengine community heroes and listen to TD hero talk about the legend of developers

Yyds dry goods inventory intelligent fan based on CC2530 design

Redis6-01nosql database

Azkaban实战

Simple use of devtools
随机推荐
Simple use of devtools
Flume配置4——自定义MYSQLSource
Machine learning experiment report 1 - linear model, decision tree, neural network part
Three line by line explanations of the source code of anchor free series network yolox (a total of ten articles, which are guaranteed to be explained line by line. After reading it, you can change the
Necessary fonts for designers
glibc strlen 实现方式分析
端口,域名,协议。
Flex flexible layout
[learning notes] month end operation -gr/ir reorganization
Pat grade a 1119 pre- and post order traversals (30 points)
Zero foundation uses paddlepaddle to build lenet-5 network
Azkaban概述
Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
Kubernetes -- cluster expansion principle
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Binary heap implementation (priority queue implementation)
Design and practice of kubernetes cluster and application monitoring scheme
qrcode:将文本生成二维码
Smart pointer shared_ PTR and weak_ Difference of PTR
Azkaban实战
