Nosqli:一款功能优秀的NoSQL注入命令行接口工具

工具使用

广大研究人员可以直接按照下列方式直接运行注入命令或查看帮助信息。


  1. $ nosqli 
  2.  
  3. NoSQLInjector is a CLI tool for testing Datastores that 
  4.  
  5. do not depend on SQL as a query language. 
  6.  
  7.   
  8.  
  9. nosqli aims to be a simple automation tool for identifying and exploiting 
  10.  
  11. NoSQL Injection vectors. 
  12.  
  13.   
  14.  
  15. Usage: 
  16.  
  17.   nosqli [command] 
  18.  
  19.   
  20.  
  21. Available Commands: 
  22.  
  23.   help        Help about any command 
  24.  
  25.   scan        Scan endpoint for NoSQL Injection vectors 
  26.  
  27.   version     Prints the current version 
  28.  
  29.   
  30.  
  31. Flags: 
  32.  
  33.       –config string       config file (default is $HOME/.nosqli.yaml) 
  34.  
  35.   -d, –data string         Specify default post data (should not include any injection strings) 
  36.  
  37.   -h, –help                help for nosqli 
  38.  
  39.   -p, –proxy string        Proxy requests through this proxy URL. Defaults to HTTP_PROXY environment variable. 
  40.  
  41.   -r, –request string      Load in a request from a file, such as a request generated in Burp or ZAP. 
  42.  
  43.   -t, –target string       target url eg. http://site.com/page?arg=1 
  44.  
  45.   -u, –user-agent string   Specify a user agent 
  46.  
  47.   
  48.  
  49. Use "nosqli [command] –help" for more information about a command. 
  50.  
  51.   
  52.  
  53. $ nosqli scan -t http://localhost:4000/user/lookup?username=test 
  54.  
  55. Running Error based scan… 
  56.  
  57. Running Boolean based scan… 
  58.  
  59. Found Error based NoSQL Injection: 
  60.  
  61.   URL: http://localhost:4000/user/lookup?=&username=test 
  62.  
  63.   param: username 
  64.  
  65.   Injection: username=' 

大家可以使用存在漏洞的NodeJS应用程序或其他的NoSql注入实验平台来测试该工具的使用。

源码构建

如果大家想要自行动手构建源码,或针对特定的平台进行源码编译,大家可以先按照下列方式将该项目源码克隆至本地,然后安装依赖,最后手动构建项目。这里要求设备上安装好最新的Go开发远景,然后配置好GOPATH环境变量。


  1. $ git clone https://github.com/Charlie-belmer/nosqli 
  2.  
  3. $ cd nosqli 
  4.  
  5. $ go get ./.. 
  6.  
  7. $ go install 
  8.  
  9. $ nosqli -h 

运行测试

该工具自带了一个测试套件,研究人员可以在该项目根目录下运行go test来进行简单的注入检测:


  1. go test ./… 

除此之外,Nosqli还提供了针对本地运行的已知易受攻击应用程序来进行注入的测试集。要使用集成测试,请安装并运行易受攻击的NodeJS Mongo注入应用程序,或者我提供的PHP Lab。接下来,我们需要在运行命令时提供集成参数:


  1. go test ./… -args -integrations=true 
【声明】:芜湖站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

相关文章