Documentation ¶
Index ¶
- Constants
- Variables
- func AddressesFromCIDR(cidr string, o chan<- string)
- func CVE_2018_14847(ip string) []string
- func CheckCVE_2021_26855(target string) string
- func CheckDCom(host string) ([]string, error)
- func CheckExchange(host *string) []string
- func DoMS17010(ip string)
- func GetExFQND(target string) string
- func IPv4Range2CIDRs(s_ip string, e_ip string) ([]string, error)
- func IPv4UIntRange2CIDRs(s_i uint32, e_i uint32) []string
- func IPv4_to_UInt(ips string) (uint32, error)
- func Info(target string)
- func InitPaths() []string
- func MS17010(ip string, timeout time.Duration)
- func Negotiate() []byte
- func NetBIOS(info *HostInfo) (string, error)
- func Ntlminfo(targetUrl string) (fqdn string, domain string)
- func Postxml(targetUrl string, fqdn string, xmlcontent string) string
- func SmbGhostScan(szIp string) (bool, error)
- func Socks5Dailer(forward *net.Dialer) (proxy.Dialer, error)
- func TrimName(name string) string
- func UInt_to_IPv4(ipi uint32) string
- func Userenumerate(targetUrl string, fqdn string, xmlcontent string, userfile string, ...)
- func Verify(targetUrl string) bool
- func WrapperTCP(network, address string, forward *net.Dialer) (net.Conn, error)
- func WrapperTcpWithTimeout(network, address string, timeout time.Duration) (net.Conn, error)
- type HostInfo
- type NbnsName
- type NetbiosInfo
- type NetbiosReplyAddress
- type NetbiosReplyHeader
- type NetbiosReplyName
- type NetbiosReplyStatus
- type Probe
- func (this *Probe) AddTarget(t string)
- func (this *Probe) CheckRateLimit()
- func (this *Probe) CloseInput()
- func (this *Probe) Initialize()
- func (this *Probe) SetLimiter(limiter *rate.Limiter)
- func (this *Probe) SetOutput(c_out chan<- ScanResult)
- func (this *Probe) Setup()
- func (this *Probe) String() string
- func (this *Probe) Wait()
- type ProbeNetbios
- func (this *ProbeNetbios) CreateNameRequest(name string) []byte
- func (this *ProbeNetbios) CreateStatusRequest() []byte
- func (this *ProbeNetbios) DecodeNetbiosName(name [32]byte) [16]byte
- func (this *ProbeNetbios) EncodeNetbiosName(name [16]byte) [32]byte
- func (this *ProbeNetbios) Initialize()
- func (this *ProbeNetbios) ParseReply(buff []byte) NetbiosReplyStatus
- func (this *ProbeNetbios) ProcessReplies()
- func (this *ProbeNetbios) ReportIncompleteResults()
- func (this *ProbeNetbios) ReportResult(ip string)
- func (this *ProbeNetbios) ResultFromIP(ip string) ScanResult
- func (this *ProbeNetbios) SendNameRequest(ip string)
- func (this *ProbeNetbios) SendRequest(ip string, req []byte)
- func (this *ProbeNetbios) SendStatusRequest(ip string)
- type Prober
- type ScanResult
Constants ¶
const MaxPendingReplies int = 256
const MaxProbeResponseTime time.Duration = time.Second * 2
const (
Proxy = "" // 代理
)
Variables ¶
var ( UNIQUE_NAMES = map[string]string{ "\x00": "Workstation Service", "\x03": "Messenger Service", "\x06": "RAS Server Service", "\x1F": "NetDDE Service", "\x20": "Server Service", "\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": "Domain Name", "\x1C": "Domain Controllers", "\x1E": "Browser Service Elections", } NetBIOS_ITEM_TYPE = map[string]string{ "\x01\x00": "NetBIOS computer name", "\x02\x00": "NetBIOS domain name", "\x03\x00": "DNS computer name", "\x04\x00": "DNS domain name", "\x05\x00": "DNS tree name", "\x07\x00": "Time stamp", } )
var IPv4_Mask_Sizes = []uint32{
2147483648,
1073741824,
536870912,
268435456,
134217728,
67108864,
33554432,
16777216,
8388608,
4194304,
2097152,
1048576,
524288,
262144,
131072,
65536,
32768,
16384,
8192,
4096,
2048,
1024,
512,
256,
128,
64,
32,
16,
8,
4,
2,
1,
}
var IPv4_Masks = map[uint32]uint32{
1: 32,
2: 31,
4: 30,
8: 29,
16: 28,
32: 27,
64: 26,
128: 25,
256: 24,
512: 23,
1024: 22,
2048: 21,
4096: 20,
8192: 19,
16384: 18,
32768: 17,
65536: 16,
131072: 15,
262144: 14,
524288: 13,
1048576: 12,
2097152: 11,
4194304: 10,
8388608: 9,
16777216: 8,
33554432: 7,
67108864: 6,
134217728: 5,
268435456: 4,
536870912: 3,
1073741824: 2,
2147483648: 1,
}
var Match_IPv4 = regexp.MustCompile(`^(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))$`)
var Match_IPv6 = regexp.MustCompile(`^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?$`)
var Scantype string
Functions ¶
func AddressesFromCIDR ¶
func CVE_2018_14847 ¶
https://nvd.nist.gov/vuln/detail/cve-2018-14847 MikroTik RouterOS through 6.42 allows unauthenticated remote attackers to read arbitrary files and remote authenticated attackers to write arbitrary files due to a directory traversal vulnerability in the WinBox interface port 8291
func CheckCVE_2021_26855 ¶
check CVE-2021-26855
https://github.com/righel/ms-exchange-version-nse/blob/main/ms-exchange-version.nse 指纹:path /ecp/Current/exporttool/microsoft.exchange.ediscovery.exporttool.application /ecp/%s/exporttool/microsoft.exchange.ediscovery.exporttool.application <assemblyIdentity.*version="(%d+.%d+.%d+.%d+)"
https://raw.githubusercontent.com/righel/ms-exchange-version-nse/main/ms-exchange-versions-dict.json https://raw.githubusercontent.com/righel/ms-exchange-version-nse/main/ms-exchange-unique-versions-dict.json https://raw.githubusercontent.com/righel/ms-exchange-version-nse/main/ms-exchange-versions-cves-dict.json port 443 https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-26855 add Microsoft Exchange Server Remote Code Execution Vulnerability CVE-2021-26855 finder https://www.msb365.blog/?p=4099
func CheckExchange ¶
func DoMS17010 ¶
func DoMS17010(ip string)
https://docs.microsoft.com/en-us/security-updates/securitybulletins/2017/ms17-010 CVE-2017-0143 CVE-2017-0144 CVE-2017-0145 CVE-2017-0146 CVE-2017-0147 CVE-2017-0148
func IPv4UIntRange2CIDRs ¶
func IPv4_to_UInt ¶
func UInt_to_IPv4 ¶
func Userenumerate ¶
Types ¶
type NbnsName ¶
type NbnsName struct {
// contains filtered or unexported fields
}
func GetNbnsname ¶
type NetbiosInfo ¶
type NetbiosInfo struct {
// contains filtered or unexported fields
}
type NetbiosReplyAddress ¶
type NetbiosReplyHeader ¶
type NetbiosReplyName ¶
type NetbiosReplyStatus ¶
type NetbiosReplyStatus struct { Header NetbiosReplyHeader HostName [15]byte UserName [15]byte Names []NetbiosReplyName Addresses []NetbiosReplyAddress HWAddr string }
type Probe ¶
type Probe struct {
// contains filtered or unexported fields
}
func (*Probe) CheckRateLimit ¶
func (this *Probe) CheckRateLimit()
func (*Probe) CloseInput ¶
func (this *Probe) CloseInput()
func (*Probe) Initialize ¶
func (this *Probe) Initialize()
func (*Probe) SetLimiter ¶
func (*Probe) SetOutput ¶
func (this *Probe) SetOutput(c_out chan<- ScanResult)
type ProbeNetbios ¶
type ProbeNetbios struct { Probe // contains filtered or unexported fields }
func (*ProbeNetbios) CreateNameRequest ¶
func (this *ProbeNetbios) CreateNameRequest(name string) []byte
func (*ProbeNetbios) CreateStatusRequest ¶
func (this *ProbeNetbios) CreateStatusRequest() []byte
func (*ProbeNetbios) DecodeNetbiosName ¶
func (this *ProbeNetbios) DecodeNetbiosName(name [32]byte) [16]byte
func (*ProbeNetbios) EncodeNetbiosName ¶
func (this *ProbeNetbios) EncodeNetbiosName(name [16]byte) [32]byte
func (*ProbeNetbios) Initialize ¶
func (this *ProbeNetbios) Initialize()
func (*ProbeNetbios) ParseReply ¶
func (this *ProbeNetbios) ParseReply(buff []byte) NetbiosReplyStatus
func (*ProbeNetbios) ProcessReplies ¶
func (this *ProbeNetbios) ProcessReplies()
func (*ProbeNetbios) ReportIncompleteResults ¶
func (this *ProbeNetbios) ReportIncompleteResults()
func (*ProbeNetbios) ReportResult ¶
func (this *ProbeNetbios) ReportResult(ip string)
func (*ProbeNetbios) ResultFromIP ¶
func (this *ProbeNetbios) ResultFromIP(ip string) ScanResult
func (*ProbeNetbios) SendNameRequest ¶
func (this *ProbeNetbios) SendNameRequest(ip string)
func (*ProbeNetbios) SendRequest ¶
func (this *ProbeNetbios) SendRequest(ip string, req []byte)
func (*ProbeNetbios) SendStatusRequest ¶
func (this *ProbeNetbios) SendStatusRequest(ip string)