文章预览
Cypher语法 本次使用tabby来分析相关利用链子,会用到Cypher的相关语句, 如以下语句是查询readobject被谁调用,深度为5,查询20条链, match ( source : Method { NAME : "readObject" }) match ( sink : Method { NAME : "put" , CLASSNAME : "java.util.Hashtable" }) CALL ]-( m1 : Method ) call apoc . algo . allSimplePaths ( source , m1 , "ALIAS>|CALL>" , 5 ) yield path return * limit 20 通过寻找equals函数到toString函数的链子,其中source点可序列化 match ( source : Method ) HAS ]-( c : Class )-[: INTERFACE | EXTENDS *]->( c1 : Class { NAME : "java.io.Serializable" }) where source . NAME in [ "equals" ] and source . CLASSNAME in [ "com.fr.esd.query.DSQueryEntity" ] match ( sink : Method { NAME : "toString" }) CALL ]-( m1 : Method ) call apoc . algo . allSimplePaths ( source , m1 , "ALIAS>|CALL>" , 2 ) yield path return * limit 2 可设置多个source点,然后定义最
………………………………