Documentation ¶
Index ¶
- Constants
- Variables
- func NewGrabMarshaler() processing.Marshaler
- func NewGrabTargetDecoder(reader io.Reader, domainOnly bool) processing.Decoder
- func NewGrabWorker(config *Config) processing.Worker
- func WriteOutput(grabChan chan Grab, doneChan chan int, config *OutputConfig)
- type Config
- type Conn
- func (c *Conn) BACNetVendorQuery() error
- func (c *Conn) BasicBanner() (string, error)
- func (c *Conn) CheckHeartbleed(b []byte) (int, error)
- func (c *Conn) Close() error
- func (c *Conn) EHLO(domain string) error
- func (c *Conn) GetFTPSCertificates() error
- func (c *Conn) GetModbusResponse() (res ModbusResponse, err error)
- func (c *Conn) IMAPBanner(b []byte) (int, error)
- func (c *Conn) IMAPQuit() error
- func (c *Conn) IMAPStartTLSHandshake() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) POP3Banner(b []byte) (int, error)
- func (c *Conn) POP3Quit() error
- func (c *Conn) POP3StartTLSHandshake() error
- func (c *Conn) Read(b []byte) (int, error)
- func (c *Conn) ReadMin(res []byte, bytes int) (cnt int, err error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SMTPBanner(b []byte) (int, error)
- func (c *Conn) SMTPHelp() error
- func (c *Conn) SMTPQuit() error
- func (c *Conn) SMTPStartTLSHandshake() error
- func (c *Conn) SendModbusEcho() (int, error)
- func (c *Conn) SetCAPool(pool *x509.CertPool)
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetDomain(domain string)
- func (c *Conn) SetExtendedRandom()
- func (c *Conn) SetExternalClientHello(clientHello []byte)
- func (c *Conn) SetGatherSessionTicket()
- func (c *Conn) SetNoSNI()
- func (c *Conn) SetOfferExtendedMasterSecret()
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetSignedCertificateTimestampExt()
- func (c *Conn) SetTLSVerbose()
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) TLSHandshake() error
- func (c *Conn) Write(b []byte) (int, error)
- type Dialer
- type ExceptionCode
- type ExceptionFunctionCode
- type ExceptionResponse
- type FunctionCode
- type Grab
- type GrabData
- type GrabTarget
- type GrabWorker
- type HTTP
- type HTTPConfig
- type HTTPHeaders
- type HTTPRequest
- type HTTPResponse
- type MEIObject
- type MEIObjectID
- type MEIObjectSet
- type MEIResponse
- type ModbusEvent
- type ModbusException
- type ModbusRequest
- type ModbusResponse
- type OutputConfig
- type SMBScanConfig
- type SMTPHelpEvent
- type UnknownHeader
- type XSSHScanConfig
Constants ¶
View Source
const ( SMTP_COMMAND = "STARTTLS\r\n" POP3_COMMAND = "STLS\r\n" IMAP_COMMAND = "a001 STARTTLS\r\n" )
View Source
const (
FunctionCodeMEI = FunctionCode(0x2B)
)
Variables ¶
View Source
var ErrRedirLocalhost = errors.New("Redirecting to Localhost")
View Source
var ModbusFunctionEncapsulatedInterface = FunctionCode(0x2B)
View Source
var ModbusHeaderBytes = []byte{
0x13, 0x37,
0x00, 0x00,
}
Functions ¶
func NewGrabMarshaler ¶
func NewGrabMarshaler() processing.Marshaler
func NewGrabTargetDecoder ¶
func NewGrabTargetDecoder(reader io.Reader, domainOnly bool) processing.Decoder
func NewGrabWorker ¶
func NewGrabWorker(config *Config) processing.Worker
func WriteOutput ¶
func WriteOutput(grabChan chan Grab, doneChan chan int, config *OutputConfig)
Types ¶
type Config ¶
type Config struct { // Connection Port uint16 Timeout time.Duration Senders uint ConnectionsPerHost uint // DNS LookupDomain bool // TLS TLS bool TLSVersion uint16 Heartbleed bool RootCAPool *x509.CertPool DHEOnly bool ECDHEOnly bool ExportsOnly bool ExportsDHOnly bool FirefoxOnly bool FirefoxNoDHE bool ChromeOnly bool ChromeNoDHE bool SafariOnly bool SafariNoDHE bool TLS13Measurements bool NoSNI bool TLSExtendedRandom bool GatherSessionTicket bool ExtendedMasterSecret bool TLSVerbose bool SignedCertificateTimestampExt bool ExternalClientHello []byte // Banners and Data Banners bool SendData bool Data []byte Raw bool // Mail SMTP bool IMAP bool POP3 bool SMTPHelp bool EHLODomain string EHLO bool StartTLS bool // FTP FTP bool FTPAuthTLS bool // Telnet Telnet bool TelnetMaxSize int // Modbus Modbus bool // BACNet BACNet bool // Niagara Fox Fox bool // DNP3 DNP3 bool // S7 S7 bool // HTTP HTTP HTTPConfig // Error handling ErrorLog *zlog.Logger // Go Runtime Config GOMAXPROCS int // x/crypto SSH XSSH XSSHScanConfig // SMB SMB SMBScanConfig KeylogFile *bufio.Writer BlacklistIP string BlacklistDom string TraceRoute bool Proxy string }
type Conn ¶
type Conn struct { CipherSuites []uint16 ForceSuites bool ExternalClientHello []byte SignedCertificateTimestampExt bool // contains filtered or unexported fields }
Implements the net.Conn interface
func (*Conn) BACNetVendorQuery ¶
func (*Conn) BasicBanner ¶
func (*Conn) GetFTPSCertificates ¶
func (*Conn) GetModbusResponse ¶
func (c *Conn) GetModbusResponse() (res ModbusResponse, err error)
func (*Conn) IMAPStartTLSHandshake ¶
func (*Conn) POP3StartTLSHandshake ¶
func (*Conn) RemoteAddr ¶
func (*Conn) SMTPStartTLSHandshake ¶
Do a STARTTLS handshake
func (*Conn) SendModbusEcho ¶
func (*Conn) SetExtendedRandom ¶
func (c *Conn) SetExtendedRandom()
func (*Conn) SetExternalClientHello ¶
func (*Conn) SetGatherSessionTicket ¶
func (c *Conn) SetGatherSessionTicket()
func (*Conn) SetOfferExtendedMasterSecret ¶
func (c *Conn) SetOfferExtendedMasterSecret()
func (*Conn) SetSignedCertificateTimestampExt ¶
func (c *Conn) SetSignedCertificateTimestampExt()
func (*Conn) SetTLSVerbose ¶
func (c *Conn) SetTLSVerbose()
func (*Conn) TLSHandshake ¶
Extra method - Do a TLS Handshake and record progress
type Dialer ¶
type ExceptionCode ¶
type ExceptionCode byte
type ExceptionFunctionCode ¶
type ExceptionFunctionCode byte
func (ExceptionFunctionCode) FunctionCode ¶
func (e ExceptionFunctionCode) FunctionCode() FunctionCode
type ExceptionResponse ¶
type ExceptionResponse struct { ExceptionFunction FunctionCode `json:"exception_function"` ExceptionType byte `json:"exception_type"` }
type FunctionCode ¶
type FunctionCode byte
func (FunctionCode) ExceptionFunctionCode ¶
func (c FunctionCode) ExceptionFunctionCode() ExceptionFunctionCode
func (FunctionCode) IsException ¶
func (c FunctionCode) IsException() bool
type Grab ¶
type Grab struct { IP net.IP Domain string Time time.Time Data GrabData Error error ErrorComponent string ComsysSource string ComsysDate string ComsysInput string Route map[int]string }
func GrabBanner ¶
func GrabBanner(config *Config, target *GrabTarget) *Grab
func (*Grab) MarshalJSON ¶
func (*Grab) UnmarshalJSON ¶
type GrabData ¶
type GrabData struct { Banner string `json:"banner,omitempty"` Read string `json:"read,omitempty"` Write string `json:"write,omitempty"` EHLO string `json:"ehlo,omitempty"` SMTPHelp *SMTPHelpEvent `json:"smtp_help,omitempty"` StartTLS string `json:"starttls,omitempty"` TLSHandshake *tls.ServerHandshake `json:"tls,omitempty"` HTTP *HTTP `json:"http,omitempty"` Heartbleed *tls.Heartbleed `json:"heartbleed,omitempty"` Modbus *ModbusEvent `json:"modbus,omitempty"` SMB *smb.SMBLog `json:"smb,omitempty"` XSSH *xssh.HandshakeLog `json:"xssh,omitempty"` FTP *ftp.FTPLog `json:"ftp,omitempty"` BACNet *bacnet.Log `json:"bacnet,omitempty"` Fox *fox.FoxLog `json:"fox,omitempty"` DNP3 *dnp3.DNP3Log `json:"dnp3,omitempty"` S7 *siemens.S7Log `json:"s7,omitempty"` Telnet *telnet.TelnetLog `json:"telnet,omitempty"` }
type GrabTarget ¶
type GrabWorker ¶
type GrabWorker struct {
// contains filtered or unexported fields
}
GrabWorker implements ztools.processing.Worker
func (*GrabWorker) Done ¶
func (g *GrabWorker) Done()
func (*GrabWorker) Failure ¶
func (g *GrabWorker) Failure() uint
func (*GrabWorker) MakeHandler ¶
func (g *GrabWorker) MakeHandler() processing.Handler
func (*GrabWorker) RunCount ¶
func (g *GrabWorker) RunCount() uint
func (*GrabWorker) Success ¶
func (g *GrabWorker) Success() uint
func (*GrabWorker) Total ¶
func (g *GrabWorker) Total() uint
type HTTP ¶
type HTTP struct { ProxyRequest *HTTPRequest `json:"connect_request,omitempty"` ProxyResponse *HTTPResponse `json:"connect_response,omitempty"` Response *http.Response `json:"response,omitempty"` RedirectResponseChain []*http.Response `json:"redirect_response_chain,omitempty"` }
type HTTPConfig ¶
type HTTPHeaders ¶
type HTTPHeaders map[string]interface{}
func HeadersFromGolangHeaders ¶
func HeadersFromGolangHeaders(h http.Header) HTTPHeaders
type HTTPRequest ¶
type HTTPResponse ¶
type HTTPResponse struct { VersionMajor int `json:"version_major,omitempty"` VersionMinor int `json:"version_minor,omitempty"` StatusCode int `json:"status_code,omitempty"` StatusLine string `json:"status_line,omitempty"` Headers HTTPHeaders `json:"headers,omitempty"` Body string `json:"body,omitempty"` BodySHA256 []byte `json:"body_sha256,omitempty"` }
type MEIObject ¶
type MEIObject struct { OID MEIObjectID Value string }
func (*MEIObject) MarshalJSON ¶
type MEIObjectID ¶
type MEIObjectID int
const ( OIDVendor MEIObjectID = 0 OIDProductCode MEIObjectID = 1 OIDRevision MEIObjectID = 2 OIDVendorURL MEIObjectID = 3 OIDProductName MEIObjectID = 4 OIDModelName MEIObjectID = 5 OIDUserApplicationName MEIObjectID = 6 )
func (*MEIObjectID) Name ¶
func (m *MEIObjectID) Name() string
type MEIObjectSet ¶
type MEIObjectSet []MEIObject
func (*MEIObjectSet) MarshalJSON ¶
func (ms *MEIObjectSet) MarshalJSON() ([]byte, error)
type MEIResponse ¶
type MEIResponse struct { ConformityLevel int `json:"conformity_level"` MoreFollows bool `json:"more_follows"` ObjectCount int `json:"object_count"` Objects MEIObjectSet `json:"objects,omitempty"` }
type ModbusEvent ¶
type ModbusEvent struct { Length int `json:"length"` UnitID int `json:"unit_id"` Function FunctionCode `json:"function_code"` Response []byte `json:"raw_response,omitempty"` MEIResponse *MEIResponse `json:"mei_response,omitempty"` ExceptionReponse *ExceptionResponse `json:"exception_response,omitempty"` }
func (*ModbusEvent) IsException ¶
func (m *ModbusEvent) IsException() bool
func (*ModbusEvent) ParseSelf ¶
func (m *ModbusEvent) ParseSelf()
type ModbusException ¶
type ModbusException struct { Function ExceptionFunctionCode ExceptionType ExceptionCode }
type ModbusRequest ¶
type ModbusRequest struct { Function FunctionCode Data []byte }
func (*ModbusRequest) MarshalBinary ¶
func (r *ModbusRequest) MarshalBinary() (data []byte, err error)
type ModbusResponse ¶
type ModbusResponse struct { Length int UnitID int Function FunctionCode Data []byte }
type SMBScanConfig ¶
type SMTPHelpEvent ¶
type SMTPHelpEvent struct {
Response string
}
An SMTPHelpEvent represents sending a "HELP" message over SMTP
type UnknownHeader ¶
type XSSHScanConfig ¶
type XSSHScanConfig struct {
XSSH bool
}
Click to show internal directories.
Click to hide internal directories.