Hook 函数列表

攻击检测

其中,SQL注入检测点为 execute/executeUpdate/executeQuery/executeBatch/executeBatchInternal/addBatch 方法之一,具体请看我们在github的源代码,这里不在赘述

基线检查

检查内容方法名称
数据库连接账号com.mysql.jdbc.NonRegisteringDriver.connect()
com.mysql.cj.jdbc.NonRegisteringDriver.connect()
org.sqlite.JDBC.connect()
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect()
org.postgresql.Driver.connect()
oracle.jdbc.driver.OracleDriver.connect()
com.ibm.db2.jcc.DB2Driver.connect()

服务器启动检测点

用途方法名称
Tomcatorg.apache.catalina.startup.Catalina.start()
Jettyorg.eclipse.jetty.server.Server.doStart()
JBoss 4org.jboss.system.server.ServerImpl.start()
JBoss 5org.jboss.bootstrap.AbstractServerImpl.start()
JBoss 6org.jboss.bootstrap.impl.base.server.AbstractServer.start()
Resincom.caucho.server.resin.Resin.initMain()
WebSphereorg.eclipse.core.launcher.Main.run()

Tomcat/Jetty/JBoss/Resin/WebSphere 通用

Resin 服务器

用途方法名称
preRequestcom.caucho.server.http.HttpRequest.handleRequest()
com.caucho.server.http.HttpRequest.handleResume()
requestcom.caucho.server.dispatch.ServletInvocation.service()
com.caucho.server.dispatch.ServletInvocation.doResume()
缓存bodycom.caucho.server.connection.ServletInputStreamImpl.read(int)
com.caucho.server.connection.ServletInputStreamImpl.read(byte[],int ,int)
com.caucho.server.http.ServletInputStreamImpl.read(int)
com.caucho.server.http.ServletInputStreamImpl.read(byte[],int ,int)
HTML注入com.caucho.server.connection.AbstractHttpResponse.finish()
com.caucho.server.connection.AbstractHttpResponse.finishInvocation()
com.caucho.server.http.AbstractHttpResponse.finish()
com.caucho.server.http.AbstractHttpResponse.finishInvocation()

Jetty 服务器

用途方法名称
preRequestorg.eclipse.jetty.server.Server.handle()
requestorg.eclipse.jetty.server.handler.HandlerWrapper.handle()
缓存bodyorg.eclipse.jetty.server.HttpInput.read(int)
org.eclipse.jetty.server.HttpInput.read(byte[],int ,int)
HTML注入org.eclipse.jetty.server.HttpOutput.close()

WebSphere 服务器

PHP 版本

攻击检测

检查内容方法名称
webshell callablearray_walk
array_filter
命令执行passthru
exec
proc_open
pcntl_exec
命令执行(webshell)
system
shell_exec
popen
目录遍历dir
opendir
XSS(echo)
文件读取file
file_get_contents
SplFileObject::__construct
文件写入
fopen
文件写入(webshell)file_put_contents
文件拷贝
文件移动rename
文件上传
文件包含include
文件运行(webshell)
assert(仅PHP5)
SQL注入
mysqli_query
mysqli_real_query
mysqli_prepare
PDO::query
PDO::prepare
pg_send_query
SQLite3::query
SQLite3::querySingle
SSRF

基线检查

检查内容方法名称
数据库连接账号
mysql_pconnect (仅PHP5)
mysqli::connect
mysqli::real_connect
PDO::__construct
pg_pconnect