Nosqli:一款功能強大的NoSQL注入命令行接口工具
Nosqli
Nosqli是一款功能強大的NoSql注入命令行接口工具,本質上來說,它就是一款NoSQL掃描和注入工具。Nosqli基于Go語言開發,是一款易于使用的NoSql注入工具,并且提供了完整的命令行接口,而且支持安全研究人員根據自己的需要來進行自定義配置。
該工具的運行速度非常快,而且掃描結果準確,具備高可用性。除此之外,其命令行接口的使用也非常簡單。
功能介紹
Nosqli當前支持針對MongoDB的NoSql注入檢測,該工具目前可以執行下列測試:
- 基于錯誤的測試:注入各種字符和Payload,掃描已知的Mongo錯誤響應;
- 布爾盲注測試:注入包含True/False參數的Payload,并嘗試判斷是否存在注入點;
- 基于時間的測試:嘗試向目標服務器注入時間延遲,并根據響應判斷是否存在注入點;
工具下載
廣大研究人員請直接訪問該項目的Releases頁面并現在對應操作系統的最新版本Nosqli。下載完成后,安裝在指定路徑,或直接從本地文件目錄中運行。

工具使用
廣大研究人員可以直接按照下列方式直接運行注入命令或查看幫助信息。
- $ nosqli
- NoSQLInjector is a CLI tool for testing Datastores that
- do not depend on SQL as a query language.
- nosqli aims to be a simple automation tool for identifying and exploiting
- NoSQL Injection vectors.
- Usage:
- nosqli [command]
- Available Commands:
- help Help about any command
- scan Scan endpoint for NoSQL Injection vectors
- version Prints the current version
- Flags:
- --config string config file (default is $HOME/.nosqli.yaml)
- -d, --data string Specify default post data (should not include any injection strings)
- -h, --help help for nosqli
- -p, --proxy string Proxy requests through this proxy URL. Defaults to HTTP_PROXY environment variable.
- -r, --request string Load in a request from a file, such as a request generated in Burp or ZAP.
- -t, --target string target url eg. http://site.com/page?arg=1
- -u, --user-agent string Specify a user agent
- Use "nosqli [command] --help" for more information about a command.
- $ nosqli scan -t http://localhost:4000/user/lookup?username=test
- Running Error based scan...
- Running Boolean based scan...
- Found Error based NoSQL Injection:
- URL: http://localhost:4000/user/lookup?=&username=test
- param: username
- Injection: username='
大家可以使用存在漏洞的NodeJS應用程序或其他的NoSql注入實驗平臺來測試該工具的使用。
源碼構建
如果大家想要自行動手構建源碼,或針對特定的平臺進行源碼編譯,大家可以先按照下列方式將該項目源碼克隆至本地,然后安裝依賴,最后手動構建項目。這里要求設備上安裝好最新的Go開發遠景,然后配置好GOPATH環境變量。
- $ git clone https://github.com/Charlie-belmer/nosqli
- $ cd nosqli
- $ go get ./..
- $ go install
- $ nosqli -h
運行測試
該工具自帶了一個測試套件,研究人員可以在該項目根目錄下運行go test來進行簡單的注入檢測:
- go test ./...
除此之外,Nosqli還提供了針對本地運行的已知易受攻擊應用程序來進行注入的測試集。要使用集成測試,請安裝并運行易受攻擊的NodeJS Mongo注入應用程序,或者我提供的PHP Lab。接下來,我們需要在運行命令時提供集成參數:
- go test ./... -args -integrations=true
項目地址
Nosqli:【GitHub傳送門】
























