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 callable
array_map
ReflectionFunction::construct
命令执行
system
shell_exec
popen
命令执行(webshell)passthru
exec
proc_open
pcntl_exec
目录遍历
scandir
XSS(echo)echo
文件读取
readfile
fopen
文件写入file_put_contents
SplFileObject::__construct
文件写入(webshell)
文件拷贝copy
文件移动
文件上传move_uploaded_file
文件包含
文件运行(webshell)eval
SQL注入mysql_query(仅PHP5)
mysqli::query
mysqli::real_query
mysqli::prepare
PDO::exec
pg_query
pg_prepare
SQLite3::exec
SSRFcurl_exec

基线检查

检查内容方法名称
数据库连接账号mysql_connect (仅PHP5)
mysqli::construct
mysqli_connect
mysqli_real_connect
pg_connect