brute

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RandStr4Cookie = util.RandStringRunes(10)

随机10个字符串

View Source
var SkipAdminBrute bool

Functions

func Addfingerprints404

func Addfingerprints404(technologies []string, req *util.Response, oPage *util.Page) []string

这里后期优化: 1、基于字典 2、相同url,相同 body.len只做一次匹配 3、支持多地方调用 4、所有异常页面 > 400 > 500都做异常页面fuzz指纹

func Addfingerprintsnormal

func Addfingerprintsnormal(payload string, technologies []string, req *util.Response, fuzzPage *util.Page) []string

正常页面指纹处理

func Admin_brute

func Admin_brute(u string) (username string, password string, loginurl string)

func Basic_brute

func Basic_brute(url string) (username string, password string)

优化应该考虑

1、一天内相同目标的结果缓存,只执行一次
2、应该考虑多线程并发执行

func ByPass403

func ByPass403(domain, path *string, wg *sync.WaitGroup) []string

403 bypass

func CheckBakPage

func CheckBakPage(req *util.Response) bool

敏感文件头信息检测:

检测头信息是否有敏感文件、本份文件、流文件等敏感信息

func CheckDirckt

func CheckDirckt(fuzzPage *util.Page, req *util.Response) bool

跳转检测

1、状态码跳转:301 代表永久性转移(Permanently Moved);302 redirect: 302 代表暂时性转移(Temporarily Moved )
2、html刷新跳转
3、js 跳转

func CheckIsErrPageAI

func CheckIsErrPageAI(req *util.Response, page *util.Page) bool

检测是否为异常页面,包括状态码检测

func CheckLoginPage

func CheckLoginPage(inputurl string) bool

func CvtLines

func CvtLines(s string) []string

func FileFuzz

func FileFuzz(u string, indexStatusCode int, indexContentLength int, indexbody string) ([]string, []string)

重写了fuzz:优化流程、优化算法、修复线程安全bug、增加智能功能

func Gettitle

func Gettitle(body string) *string

获取标题

func InitGeneral

func InitGeneral() int

生成敏感信息字典

func Jboss_brute

func Jboss_brute(url string) (username string, password string)

func PenetrateEndpoint

func PenetrateEndpoint(wg *sync.WaitGroup, url string, rst chan Result403, header ...string)

func StudyErrPageAI

func StudyErrPageAI(req *util.Response, page *util.Page, fingerprintsTag string)

智能学习: 非正常页面,并记录到库中永久使用,使用该方法到页面 要么是异常页面,要么是需要学习到指纹,带标记带

0、识别学习过的url就跳过
1、body 学习
2、标题 学习
3、url 去重记录

func Tomcat_brute

func Tomcat_brute(url string) (username string, password string)

func Weblogic_brute

func Weblogic_brute(url string) (username string, password string)

weblogic默认的登陆尝试次数为5次,

5次失败则weblogic用户锁定,即使你已经找到正确的密码,也不能登陆到console
默认的锁定时间为30分钟,后期可以设置策略,自动后台运行,每30分钟走一轮不重复的密码
后期再优化间隔35分钟后继续后面的密码

Types

type ErrPage

type ErrPage struct {
	gorm.Model
	FingerprintsTag string `json:"fingerprintsTag"` // 指纹标签,带标签是指纹数据,不是异常数据
	Title           string `json:"title"`           // 标题
	Body            string `json:"body"`            // body
	BodyLen         int    `json:"bodyLen"`         // body len
	BodyHash        string `json:"bodyHash"`        // body hash, Favicohash4key
	BodyMd5         string `json:"bodyMd5"`         // body md5
	HitCnt          uint32 `json:"hitCnt"`          // 命中统计
}

异常页面数据库

func CheckRepeat

func CheckRepeat(data *ErrPage) (bool, *ErrPage)

判断库中是否已经存在

type Result403

type Result403 struct {
	Url string
	Ok  bool
	Err error
}

type UserPass

type UserPass struct {
	// contains filtered or unexported fields
}

func CvtUps

func CvtUps(s string) []UserPass

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL