Plugins

package
v0.0.0-...-9ee51a9 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FCGI_BEGIN_REQUEST uint8 = iota + 1
	FCGI_ABORT_REQUEST
	FCGI_END_REQUEST
	FCGI_PARAMS
	FCGI_STDIN
	FCGI_STDOUT
	FCGI_STDERR
)
View Source
const (
	FCGI_RESPONDER uint8 = iota + 1
)

Variables

View Source
var (
	UNIQUE_NAMES = map[string]string{
		"\x00": "WorkstationService",
		"\x03": "Messenger Service",
		"\x06": "RAS Server Service",
		"\x1F": "NetDDE Service",
		"\x20": "ServerService",
		"\x21": "RAS Client Service",
		"\xBE": "Network Monitor Agent",
		"\xBF": "Network Monitor Application",
		"\x1D": "Master Browser",
		"\x1B": "Domain Master Browser",
	}

	GROUP_NAMES = map[string]string{
		"\x00": "DomainName",
		"\x1C": "DomainControllers",
		"\x1E": "Browser Service Elections",
	}

	NetBIOS_ITEM_TYPE = map[string]string{
		"\x01\x00": "NetBiosComputerName",
		"\x02\x00": "NetBiosDomainName",
		"\x03\x00": "ComputerName",
		"\x04\x00": "DomainName",
		"\x05\x00": "DNS tree name",
		"\x07\x00": "Time stamp",
	}
	NegotiateSMBv1Data1 = []byte{}/* 137 elements not displayed */

	NegotiateSMBv1Data2 = []byte{}/* 270 elements not displayed */

)
View Source
var (
	AliveHosts []string
	ExistHosts = make(map[string]struct{})
)
View Source
var ClientHost string
View Source
var Mutex = &sync.Mutex{}
View Source
var PluginList = map[string]interface{}{
	"21":      FtpScan,
	"22":      SshScan,
	"135":     Findnet,
	"139":     NetBIOS,
	"445":     SmbScan,
	"1433":    MssqlScan,
	"1521":    OracleScan,
	"3306":    MysqlScan,
	"3389":    RdpScan,
	"5432":    PostgresScan,
	"6379":    RedisScan,
	"9000":    FcgiScan,
	"11211":   MemcachedScan,
	"27017":   MongodbScan,
	"1000001": MS17010,
	"1000002": SmbGhost,
	"1000003": WebTitle,
	"1000004": SmbScan2,
	"1000005": WmiExec,
}

Functions

func AddScan

func AddScan(scantype string, info common.HostInfo, ch *chan struct{}, wg *sync.WaitGroup)

func AesDecrypt

func AesDecrypt(cryted string, key string) string

func AesEncrypt

func AesEncrypt(orig string, key string) string

func ArrayCountValueTop

func ArrayCountValueTop(arrInit []string, length int, flag bool) (arrTop []string, arrLen []int)

func CheckLive

func CheckLive(hostslist []string, Ping bool) []string

func ExecCommandPing

func ExecCommandPing(ip string) bool

func Expoilt

func Expoilt(realhost string, conn net.Conn) error

func FcgiScan

func FcgiScan(info *common.HostInfo)

func Findnet

func Findnet(info *common.HostInfo) error

func FindnetScan

func FindnetScan(info *common.HostInfo) error

func FtpConn

func FtpConn(info *common.HostInfo, user string, pass string) (flag bool, err error)

func FtpScan

func FtpScan(info *common.HostInfo) (tmperr error)

func GOWebTitle

func GOWebTitle(info *common.HostInfo) (err error, CheckData []WebScan.CheckDatas)

func GetProtocol

func GetProtocol(host string, Timeout int64) (protocol string)

func HexUnicodeStringToString

func HexUnicodeStringToString(src string) string

func IsContain

func IsContain(items []string, item string) bool

func MS17010

func MS17010(info *common.HostInfo) error

func MS17010EXP

func MS17010EXP(info *common.HostInfo)

func MS17010Scan

func MS17010Scan(info *common.HostInfo) error

func MemcachedScan

func MemcachedScan(info *common.HostInfo) (err error)

func MongodbScan

func MongodbScan(info *common.HostInfo) error

func MongodbUnauth

func MongodbUnauth(info *common.HostInfo) (flag bool, err error)

func MssqlConn

func MssqlConn(info *common.HostInfo, user string, pass string) (flag bool, err error)

func MssqlScan

func MssqlScan(info *common.HostInfo) (tmperr error)

func MysqlConn

func MysqlConn(info *common.HostInfo, user string, pass string) (flag bool, err error)

func MysqlScan

func MysqlScan(info *common.HostInfo) (tmperr error)

func NetBIOS

func NetBIOS(info *common.HostInfo) error

func NoPortScan

func NoPortScan(hostslist []string, ports string) (AliveAddress []string)

func OracleConn

func OracleConn(info *common.HostInfo, user string, pass string) (flag bool, err error)

func OracleScan

func OracleScan(info *common.HostInfo) (tmperr error)

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blocksize int) []byte

补码 AES加密数据块分组长度必须为128bit(byte[16]),密钥长度可以是128bit(byte[16])、192bit(byte[24])、256bit(byte[32])中的任意一个。

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

去码

func PortConnect

func PortConnect(addr Addr, respondingHosts chan<- string, adjustedTimeout int64, wg *sync.WaitGroup)

func PortScan

func PortScan(hostslist []string, ports string, timeout int64) []string

func PostgresConn

func PostgresConn(info *common.HostInfo, user string, pass string) (flag bool, err error)

func PostgresScan

func PostgresScan(info *common.HostInfo) (tmperr error)

func RdpConn

func RdpConn(ip, domain, user, password string, port int, timeout int64) (bool, error)

func RdpScan

func RdpScan(info *common.HostInfo) (tmperr error)

func ReadBytes

func ReadBytes(conn net.Conn) (result []byte, err error)

func Readfile

func Readfile(filename string) (string, error)

func RedisConn

func RedisConn(info *common.HostInfo, pass string) (flag bool, err error)

func RedisScan

func RedisScan(info *common.HostInfo) (tmperr error)

func RedisUnauth

func RedisUnauth(info *common.HostInfo) (flag bool, err error)

func RunIcmp1

func RunIcmp1(hostslist []string, conn *icmp.PacketConn, chanHosts chan string)

func RunIcmp2

func RunIcmp2(hostslist []string, chanHosts chan string)

func RunPing

func RunPing(hostslist []string, chanHosts chan string)

func Scan

func Scan(info common.HostInfo)

func ScanFunc

func ScanFunc(name *string, info *common.HostInfo)

func Smb2Con

func Smb2Con(info *common.HostInfo, user string, pass string, hash []byte, hasprint bool) (flag bool, err error, flag2 bool)

func SmbGhost

func SmbGhost(info *common.HostInfo) error

func SmbGhostScan

func SmbGhostScan(info *common.HostInfo) error

func SmbScan

func SmbScan(info *common.HostInfo) (tmperr error)

func SmbScan2

func SmbScan2(info *common.HostInfo) (tmperr error)

func SmblConn

func SmblConn(info *common.HostInfo, user string, pass string, signal chan struct{}) (flag bool, err error)

func SshConn

func SshConn(info *common.HostInfo, user string, pass string) (flag bool, err error)

func SshScan

func SshScan(info *common.HostInfo) (tmperr error)

func WMIExec

func WMIExec(target, username, password, hash, domain, command, clientHostname, binding string, cfgIn *wmiexec.WmiExecConfig) (flag bool, err error)

func WebTitle

func WebTitle(info *common.HostInfo) error

func WmiExec

func WmiExec(info *common.HostInfo) (tmperr error)

func Wmiexec

func Wmiexec(info *common.HostInfo, user string, pass string, hash string) (flag bool, err error)

Types

type Addr

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

type Brutelist

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

type Client

type Client struct {
	Host string // ip:port
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, logLevel glog.LEVEL) *Client

func (*Client) Login

func (g *Client) Login(domain, user, pwd string, timeout int64) error

type FCGIClient

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

func New

func New(addr string, timeout int64) (fcgi *FCGIClient, err error)

func (*FCGIClient) Request

func (c *FCGIClient) Request(env map[string]string, reqStr string) (retout []byte, reterr []byte, err error)

type NetBiosInfo

type NetBiosInfo struct {
	GroupName          string
	WorkstationService string `yaml:"WorkstationService"`
	ServerService      string `yaml:"ServerService"`
	DomainName         string `yaml:"DomainName"`
	DomainControllers  string `yaml:"DomainControllers"`
	ComputerName       string `yaml:"ComputerName"`
	OsVersion          string `yaml:"OsVersion"`
	NetDomainName      string `yaml:"NetBiosDomainName"`
	NetComputerName    string `yaml:"NetBiosComputerName"`
}

func GetNbnsname

func GetNbnsname(info *common.HostInfo) (netbios NetBiosInfo, err error)

func JoinNetBios

func JoinNetBios(netbios1, netbios2 *NetBiosInfo) *NetBiosInfo

func NetBIOS1

func NetBIOS1(info *common.HostInfo) (netbios NetBiosInfo, err error)

func ParseNTLM

func ParseNTLM(ret []byte) (netbios NetBiosInfo, err error)

func ParseNetBios

func ParseNetBios(input []byte) (netbios NetBiosInfo, err error)

func (*NetBiosInfo) String

func (info *NetBiosInfo) String() (output string)

Jump to

Keyboard shortcuts

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