Documentation ¶
Overview ¶
SQLite Caching and Cross-Exploit Database
The db package contains the logic to handle a user provided SQLite DB in order to store results and cache HTTP responses. This has a few useful benefits:
- When scanning with hundreds of go-exploit implementations, the user significantly cuts down on network requests (therefore speeding up scanning), both from the verified results being cached (you only have to verify a target is Confluence once) and from the cached HTTP responses.
- The result is a useful asset database containing IP, port, installed software, and versions.
- The database can be reused with a go-exploit and generate no network traffic (assuming you aren't doing the exploitation stage). That is very interesting when, for example, you wrote a version scanner for CVE-2024-31982, scanned a customer host that was patched, but then CVE-2024-31983 is released the next day. You can essentially rescan the cached version of their system with your new CVE scanner.
Mostly this package should be totally transparent to users of the framework. The only direct interface, currently, should be calls to HTTPGetCache.
Index ¶
- Variables
- func CacheHTTPResponse(rhost string, rport int, path string, httpResp []byte)
- func GetHTTPResponse(rhost string, rport int, path string) (string, bool)
- func GetVerified(product string, rhost string, rport int) (bool, bool)
- func InitializeDB(name string) bool
- func UpdateVerified(software string, installed bool, version string, rhost string, rport int) bool
Constants ¶
This section is empty.
Variables ¶
var GlobalHTTPRespCacheLimit int
GlobalHTTPRespCacheLimit is the maximum size of an HTTP body that we will attempt to cache.
var GlobalSQLHandle *sql.DB
GlobalSQLHandle is a handle to the SQLite DB for handling cross-exploit data sharing.
Functions ¶
func CacheHTTPResponse ¶
Attempt to cache the provided HTTP httpResp in the database.
func GetHTTPResponse ¶
Look for an HTTP response in the db cache.
func GetVerified ¶
Check the database to see if the target has been scanned for specific software. If so, return the result (so we don't do it again) Return is <db-value>,<ok>.
func InitializeDB ¶
Types ¶
This section is empty.