Projects STRLCPY Sirius Commits c1ca5b36
🤬
  • ■ ■ ■ ■ ■ ■
    Engine/Dockerfile
     1 +# Go API Dockerfile
     2 + 
     3 +FROM golang:1.20-bullseye
     4 +WORKDIR /engine
     5 + 
     6 +COPY .air.toml .air.toml
     7 + 
     8 +# Dependencies
     9 +RUN apt-get update
     10 +RUN apt install -y build-essential
     11 +RUN apt install -y libpcap-dev ndiff
     12 + 
     13 +WORKDIR /tmp
     14 +RUN wget https://nmap.org/dist/nmap-7.92.tar.bz2
     15 +RUN tar xf nmap-7.92.tar.bz2
     16 + 
     17 +WORKDIR /tmp/nmap-7.92
     18 +RUN ./configure
     19 +RUN make
     20 +RUN make install
     21 +RUN cp nmap /usr/bin/nmap
     22 +RUN cp nmap-os-db /usr/local/bin/../share/nmap/nmap-os-db
     23 + 
     24 +WORKDIR /engine
     25 +#DEV Dependencies
     26 +RUN go install github.com/cosmtrek/air@latest
     27 + 
     28 +# Invoke air to run the server after volume mount
     29 +ENTRYPOINT [ "air" ]
     30 + 
     31 +EXPOSE 5672
  • ■ ■ ■ ■ ■ ■
    Engine/core/DiscoveryScanner.go
     1 +package core
     2 + 
     3 +import (
     4 + "log"
     5 +)
     6 + 
     7 +// VulnerabilityScanner subscribes to the queue and listens for scan requests
     8 +// When a scan request is received, it will execute scans for each target up to the scan queue
     9 +func DiscoveryScanner() {
     10 + log.Println("Vulnerability Scanner Invoked")
     11 + 
     12 +}
     13 + 
  • ■ ■ ■ ■ ■ ■
    Engine/core/NewScan.go
     1 +package core
     2 + 
     3 +import (
     4 + "fmt"
     5 + "log"
     6 + "os"
     7 + 
     8 + //Internal Libraries
     9 + lib "github.com/0sm0s1z/Sirius-Scan/Engine/lib"
     10 +)
     11 + 
     12 +// NewScan is the main scanning engine
     13 +func NewScan(job lib.ScanRequest) {
     14 + log.Printf("Starting New Scan Job: %s", job.ScanID)
     15 + 
     16 + //Create Scratch Directory for Scan
     17 + os.MkdirAll("/tmp/sirius/"+job.ScanID, 0755)
     18 + 
     19 + //Transform ScanRequest into a TargetMatrix
     20 + targetMatrix := lib.BuildTargetMatrix(job)
     21 + 
     22 + //Start the Vulnerability Scan Consumer microservice
     23 + go VulnerabilityScanner()
     24 + 
     25 + //For each Target run a scan
     26 + for _, target := range targetMatrix {
     27 + //Execute Sirius Scan
     28 + //Discovery Scanner
     29 + //go scanners.DiscoveryScanner()
     30 + fmt.Println(target)
     31 + 
     32 + }
     33 + 
     34 + //log.Println(targetMatrix)
     35 + 
     36 + //For each Target run a scan
     37 + /*
     38 + for _, target := range request.Targets {
     39 + //Execute Nmap Scan
     40 + rawScanResults := "/tmp/sirius/" + scanID + "/" + target + "-nmapportscan.xml"
     41 + cmd, err := exec.Command("nmap", "-sV", "-O", "--script=vuln,vulners,default,safe", target, "-oX", rawScanResults).Output()
     42 + //Get command response
     43 + if err != nil {
     44 + log.Println(err)
     45 + }
     46 + log.Println(string(cmd))
     47 + 
     48 + }*/
     49 + 
     50 + scanStatus := lib.SystemStatus{
     51 + Profile: "root",
     52 + Status: "OK",
     53 + Tasks: []lib.SystemTask{
     54 + {
     55 + TaskID: "2",
     56 + TaskName: job.ScanID,
     57 + TaskStatus: "Done",
     58 + TaskProgress: 100,
     59 + },
     60 + },
     61 + }
     62 + 
     63 + log.Println(scanStatus)
     64 + //var scanResults []siriusNmap.CVE
     65 + //var hostCVEs []HostCVE
     66 + 
     67 +}
     68 + 
  • ■ ■ ■ ■ ■ ■
    Engine/core/ScanHandler.go
     1 +package core
     2 + 
     3 +/*
     4 +import (
     5 + "fmt"
     6 + 
     7 + scanners "github.com/0sm0s1z/Sirius-Scan/core/scanners"
     8 + lib "github.com/0sm0s1z/Sirius-Scan/lib"
     9 +)
     10 + 
     11 +// ScanHandler takes a TargetMatrix and executes scans
     12 +func ScanHandler(targetMatrix lib.TargetMatrix) {
     13 + fmt.Println("ScanHandler Invoked")
     14 + 
     15 + //Begin the Vulnerability Scanner
     16 + go scanners.VulnerabilityScanner() // This is a goroutine
     17 + 
     18 +}*/
     19 + 
  • ■ ■ ■ ■ ■ ■
    Engine/core/VulnerabilityScanner.go
     1 +package core
     2 + 
     3 +import (
     4 + "encoding/json"
     5 + "log"
     6 + 
     7 + "github.com/streadway/amqp"
     8 + 
     9 + lib "github.com/0sm0s1z/Sirius-Scan/Engine/lib"
     10 +)
     11 + 
     12 +func failOnError(err error, msg string) {
     13 + if err != nil {
     14 + log.Fatalf("%s: %s", msg, err)
     15 + }
     16 +}
     17 + 
     18 +// VulnerabilityScanner subscribes to the queue and listens for scan requests
     19 +// When a scan request is received, it will execute scans for each target up to the scan queue
     20 +func VulnerabilityScanner() {
     21 + conn, err := amqp.Dial("amqp://guest:guest@rabbitmq:5672/")
     22 + failOnError(err, "Failed to connect to RabbitMQ")
     23 + defer conn.Close()
     24 + 
     25 + ch, err := conn.Channel()
     26 + failOnError(err, "Failed to open a channel")
     27 + defer ch.Close()
     28 + 
     29 + q, err := ch.QueueDeclare(
     30 + "scan", // name
     31 + false, // durable
     32 + false, // delete when unused
     33 + false, // exclusive
     34 + false, // no-wait
     35 + nil, // arguments
     36 + )
     37 + failOnError(err, "Failed to declare a queue")
     38 + 
     39 + msgs, err := ch.Consume(
     40 + q.Name, // queue
     41 + "", // consumer
     42 + true, // auto-ack
     43 + false, // exclusive
     44 + false, // no-local
     45 + false, // no-wait
     46 + nil, // args
     47 + )
     48 + failOnError(err, "Failed to register a consumer")
     49 + 
     50 + // Start Scanning each target in the queue
     51 + forever := make(chan bool)
     52 + 
     53 + go func() {
     54 + for d := range msgs {
     55 + log.Printf("Received a message: %s", d.Body)
     56 + var targetMatrix lib.TargetMatrix
     57 + json.Unmarshal(d.Body, &targetMatrix)
     58 + }
     59 + }()
     60 + <-forever
     61 +}
     62 + 
  • ■ ■ ■ ■ ■ ■
    Engine/core/scanners/scanners.go
     1 +package scanners
     2 + 
  • ■ ■ ■ ■ ■ ■
    Engine/go.mod
     1 +module github.com/0sm0s1z/Sirius-Scan/Engine
     2 + 
     3 +go 1.17
     4 + 
     5 +require (
     6 + github.com/rabbitmq/amqp091-go v1.5.0 // indirect
     7 + github.com/streadway/amqp v1.0.0 // indirect
     8 + github.com/wagslane/go-rabbitmq v0.12.1 // indirect
     9 +)
     10 + 
  • ■ ■ ■ ■ ■ ■
    Engine/go.sum
     1 +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
     2 +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
     3 +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
     4 +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
     5 +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
     6 +github.com/rabbitmq/amqp091-go v1.5.0 h1:VouyHPBu1CrKyJVfteGknGOGCzmOz0zcv/tONLkb7rg=
     7 +github.com/rabbitmq/amqp091-go v1.5.0/go.mod h1:JsV0ofX5f1nwOGafb8L5rBItt9GyhfQfcJj+oyz0dGg=
     8 +github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo=
     9 +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
     10 +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
     11 +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
     12 +github.com/wagslane/go-rabbitmq v0.12.1 h1:A3ec8wmP3hr1SKsbXwFaf42xXd5D7yAeJfdFZJydKlU=
     13 +github.com/wagslane/go-rabbitmq v0.12.1/go.mod h1:jTSN7opv/tmphx0MYaRR/++HQCuhxrBZEyTd0xCym2c=
     14 +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
     15 +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
     16 +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
     17 +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
     18 +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
     19 +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
     20 +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
     21 +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
     22 +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
     23 +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
     24 +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
     25 +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
     26 +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
     27 +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
     28 +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
     29 +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
     30 +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
     31 +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
     32 +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
     33 +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
     34 +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
     35 +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
     36 +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
     37 +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
     38 +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
     39 +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
     40 +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
     41 +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
     42 +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
     43 +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
     44 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/BuildTargetMatrix.go
     1 +package lib
     2 + 
     3 +// BuildTargetMatrix builds a matrix of targets to scan
     4 +func BuildTargetMatrix(job ScanRequest) []string {
     5 + 
     6 + var targetMatrix []string
     7 + for _, target := range job.Targets {
     8 + //Determines if target is a host or a network
     9 + //If host, add to targetMatrix
     10 + //If network, generate host list and add to targetMatrix
     11 + if IsHost(target) {
     12 + targetMatrix = append(targetMatrix, ExpandNetwork(target)...)
     13 + } else if IsNetwork(target) {
     14 + //Generate Host List
     15 + //Add to targetMatrix
     16 + targetMatrix = append(targetMatrix, ExpandNetwork(target)...)
     17 + }
     18 + }
     19 + //log.Println(targetMatrix.targets[0])
     20 + return targetMatrix
     21 +}
     22 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/ExpandNetwork.go
     1 +package lib
     2 + 
     3 +import (
     4 + "encoding/binary"
     5 + "log"
     6 + "net"
     7 + "strings"
     8 +)
     9 + 
     10 +// ExpandNetwork expands a CIDR notation into a list of hosts
     11 +func ExpandNetwork(target string) []string {
     12 + //Generate Host List
     13 + //Expand CIDR notation into a list of hosts
     14 + _, ipv4Net, err := net.ParseCIDR(target)
     15 + if err != nil {
     16 + log.Fatal(err)
     17 + }
     18 + 
     19 + // convert IPNet struct mask and address to uint32
     20 + // network is BigEndian
     21 + mask := binary.BigEndian.Uint32(ipv4Net.Mask)
     22 + start := binary.BigEndian.Uint32(ipv4Net.IP)
     23 + 
     24 + // find the final address
     25 + finish := (start & mask) | (mask ^ 0xffffffff)
     26 + 
     27 + var hostList []string
     28 + // loop through addresses as uint32
     29 + for i := start; i <= finish; i++ {
     30 + // convert back to net.IP
     31 + ip := make(net.IP, 4)
     32 + binary.BigEndian.PutUint32(ip, i)
     33 + hostList = append(hostList, strings.Join([]string{ip.String()}, ""))
     34 + }
     35 + 
     36 + //Add to targetMatrix
     37 + return hostList
     38 + 
     39 +}
     40 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/IsHost.go
     1 +package lib
     2 + 
     3 +import (
     4 + "net"
     5 +)
     6 + 
     7 +// IsHost checks if the given string is a valid host
     8 +func IsHost(target string) bool {
     9 + if net.ParseIP(target) != nil {
     10 + return true
     11 + }
     12 + return false
     13 +}
     14 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/IsNetwork.go
     1 +package lib
     2 + 
     3 +import (
     4 + "log"
     5 + "net"
     6 +)
     7 + 
     8 +// IsNetwork checks if the given string is a valid network
     9 +func IsNetwork(target string) bool {
     10 + ipv4Addr, ipv4Net, err := net.ParseCIDR(target)
     11 + if err != nil {
     12 + log.Fatal(err)
     13 + } else {
     14 + return true
     15 + }
     16 + ipv4Addr = ipv4Addr.Mask(ipv4Net.Mask)
     17 + return false
     18 +}
     19 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/RegisterConsumer.go
     1 +package lib
     2 + 
     3 +import (
     4 + "log"
     5 + 
     6 + "github.com/streadway/amqp"
     7 +)
     8 + 
     9 +func failOnError(err error, msg string) {
     10 + if err != nil {
     11 + log.Fatalf("%s: %s", msg, err)
     12 + }
     13 +}
     14 + 
     15 +// RegisterConsumer registers a consumer with the queue
     16 +func RegisterConsumer(name string) {
     17 + conn, err := amqp.Dial("amqp://guest:guest@rabbitmq:5672/")
     18 + failOnError(err, "Failed to connect to RabbitMQ")
     19 + defer conn.Close()
     20 + 
     21 + ch, err := conn.Channel()
     22 + failOnError(err, "Failed to open a channel")
     23 + defer ch.Close()
     24 + 
     25 + q, err := ch.QueueDeclare(
     26 + "hello", // name
     27 + false, // durable
     28 + false, // delete when unused
     29 + false, // exclusive
     30 + false, // no-wait
     31 + nil, // arguments
     32 + )
     33 + failOnError(err, "Failed to declare a queue")
     34 + 
     35 + msgs, err := ch.Consume(
     36 + q.Name, // queue
     37 + "", // consumer
     38 + true, // auto-ack
     39 + false, // exclusive
     40 + false, // no-local
     41 + false, // no-wait
     42 + nil, // args
     43 + )
     44 + failOnError(err, "Failed to register a consumer")
     45 + log.Println(msgs)
     46 + 
     47 +}
     48 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/ScanEngineTypes.go
     1 +package lib
     2 + 
     3 +type ScanRequest struct {
     4 + ScanID string
     5 + Command string
     6 + Targets []string
     7 + ScanReport ScanReport
     8 +}
     9 + 
     10 +type ScanReport struct {
     11 + ScanID string
     12 + ScanType string
     13 + ScanStatus string
     14 + ScanProgress int
     15 + ScanResults []SVDBHost
     16 +}
     17 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/SiriusTypes.go
     1 +package lib
     2 + 
     3 +import "time"
     4 + 
     5 +// CoreAPI types
     6 +type SystemStatus struct {
     7 + Profile string `json:"profile"`
     8 + Status string `json:"status"`
     9 + Tasks []SystemTask `json:"tasks"`
     10 +}
     11 +type SystemTask struct {
     12 + TaskID string `json:"task_id"`
     13 + TaskName string `json:"task_name"`
     14 + TaskStatus string `json:"task_status"`
     15 + TaskProgress int `json:"task_progress"`
     16 +}
     17 + 
     18 +// SVDB types
     19 +type SVDBEntry struct {
     20 + CVEDataFormat string
     21 + CVEDataType string
     22 + CVEDataVersion string
     23 + CVEDataNumberOfCVEs string
     24 + CVEDataTimestamp string
     25 + CVEItems []CVEItem
     26 + CVEDataMeta CVEDataMeta
     27 + Description Description
     28 + CPE Node
     29 + CVSSV3 CVSSV3
     30 + References []string
     31 + Tags []string
     32 +}
     33 + 
     34 +type SVDBHost struct {
     35 + OS string `json:"os"`
     36 + OSVersion string `json:"osversion"`
     37 + IP string `json:"ip"`
     38 + Hostname string `json:"hostname"`
     39 + Services []Service
     40 + CVE []string
     41 + CPE []string `json:"cpe"`
     42 + Agent SiriusAgent
     43 +}
     44 +type SiriusAgent struct {
     45 + AgentId string
     46 + HostKey string
     47 + IP string
     48 + OS string
     49 + Tasks []Task
     50 +}
     51 +type TaskResponse struct {
     52 + AgentId string
     53 + IP string
     54 + Task Task
     55 +}
     56 +type Task struct {
     57 + ID string
     58 + Type string
     59 + Command string
     60 + Result string
     61 + Status string
     62 + Date time.Time
     63 +}
     64 +type Service struct {
     65 + Port int `json:"port"`
     66 + Product string `json:"product"`
     67 + Version string `json:"version"`
     68 + CPE string `json:"cpe"`
     69 +}
     70 +type TerminalHistory struct {
     71 + Id string
     72 + IP string
     73 + Command string
     74 + Result string
     75 + Status string
     76 + Date time.Time
     77 +}
     78 +type Finding struct {
     79 + CVE CVE
     80 + SVDBID string
     81 +}
     82 +type FindingRequest struct {
     83 + CVE []string
     84 + SVDBID string
     85 +}
     86 +type CVEFinding struct {
     87 + CVEDataType string `json:"cvedatatype"`
     88 + CVEDataFormat string `json:"cvedataformat"`
     89 + CVEDataVersion string `json:"cvedataversion"`
     90 + CVEDataNumberOfCVEs *string `json:"cvedatanumberofcves,omitempty"`
     91 + CVEDataTimestamp string `json:"cvedatatimestamp"`
     92 + CVEDataMeta CVEDataMeta
     93 + Description Description `json:"description"`
     94 +}
     95 + 
     96 +type HostCVE struct {
     97 + Host string
     98 + CVEList []string
     99 +}
     100 + 
     101 +type (
     102 + CVEResponse struct {
     103 + ResultsPerPage int `json:"resultsPerPage"`
     104 + StartIndex int `json:"startIndex"`
     105 + TotalResults int `json:"totalResults"`
     106 + Result CVEResult `json:"result"`
     107 + }
     108 + 
     109 + CVEResult struct {
     110 + CVEDataType string `json:"CVE_data_type"`
     111 + CVEDataFormat string `json:"CVE_data_format"`
     112 + CVEDataVersion string `json:"CVE_data_version"`
     113 + CVEDataNumberOfCVEs *string `json:"CVE_data_numberOfCVEs,omitempty"`
     114 + CVEDataTimestamp string `json:"CVE_data_timestamp"`
     115 + CVEItems *[]CVEItem `json:"CVE_Items,omitempty"`
     116 + }
     117 + 
     118 + // CVEITEM defines a vulnerability in the NVD data feed as defined
     119 + // in the NIST API schema.
     120 + CVEItem struct {
     121 + CVE CVE `json:"cve"`
     122 + Configurations Configurations `json:"configurations,omitempty"`
     123 + Impact *Impact `json:"impact,omitempty"`
     124 + PublishedDate *string `json:"publishedDate,omitempty"`
     125 + LastModifiedDate *string `json:"lastModifiedDate,omitempty"`
     126 + }
     127 + 
     128 + // CVE as defined in the NIST API schema.
     129 + CVE struct {
     130 + DataType string `json:"data_type"`
     131 + DataFormat string `json:"data_format"`
     132 + DataVersion string `json:"data_version"`
     133 + CVEDataMeta CVEDataMeta `json:"cve_data_meta"`
     134 + Affects *Affects `json:"affects,omitempty"`
     135 + ProblemType ProblemType `json:"problemtype"`
     136 + References References `json:"references"`
     137 + Description Description `json:"description"`
     138 + }
     139 + 
     140 + CVEDataMeta struct {
     141 + ID string `json:"ID"`
     142 + ASSIGNER string `json:"ASSIGNER"`
     143 + STATE *string `json:"STATE,omitempty"`
     144 + }
     145 + 
     146 + Affects struct {
     147 + Vendor Vendor `json:"vendor"`
     148 + }
     149 + 
     150 + Vendor struct {
     151 + // VendorData has a minimum of 0 items according to the
     152 + // NIST API schema.
     153 + VendorData []VendorData `json:""`
     154 + }
     155 + 
     156 + VendorData struct {
     157 + VendorName string `json:"vendor_name"`
     158 + Product VendorProduct `json:"product"`
     159 + }
     160 + 
     161 + VendorProduct struct {
     162 + // ProductData has a minimum of 1 item according to the
     163 + // NIST API schema.
     164 + ProductData []Product `json:"product_data"`
     165 + }
     166 + 
     167 + ProblemType struct {
     168 + // ProblemTypeData has a minimum of 0 items according to the
     169 + // NIST API schema.
     170 + ProblemTypeData []ProblemTypeData `json:"problemtype_data"`
     171 + }
     172 + 
     173 + ProblemTypeData struct {
     174 + // Description has a minimum of 0 items according to the
     175 + // NIST API schema.
     176 + Description []LangString `json:"description"`
     177 + }
     178 + 
     179 + References struct {
     180 + // ReferenceData has a minimum of 0 and a maximum of 500
     181 + // items according to the NIST API schema.
     182 + ReferenceData []CVEReference `json:"reference_data"`
     183 + }
     184 + 
     185 + Description struct {
     186 + // DescriptionData has a minimum of 0 items according to
     187 + // the NIST API schema.
     188 + DescriptionData []LangString `json:"description_data"`
     189 + }
     190 + 
     191 + Product struct {
     192 + ProductName string `json:"product_name"`
     193 + Version Version `json:"version"`
     194 + }
     195 + 
     196 + Version struct {
     197 + // VersionData has a minimum of 1 item according to the
     198 + // NIST API schema.
     199 + VersionData []VersionData `json:"version_data"`
     200 + }
     201 + 
     202 + VersionData struct {
     203 + VersionValue string `json:"version_value"`
     204 + VersionAffected *string `json:"version_affected,omitempty"`
     205 + }
     206 + 
     207 + CVEReference struct {
     208 + // URL has a maximum length of 500 characters according to the
     209 + // NIST API schema.
     210 + URL string `json:"url"`
     211 + Name *string `json:"name,omitempty"`
     212 + Refsource *string `json:"refsource,omitempty"`
     213 + Tags *[]string `json:"tags,omitempty"`
     214 + }
     215 + 
     216 + LangString struct {
     217 + Lang string `json:"lang"`
     218 + // Value has a maximum length of 3999 characters according to the
     219 + // NIST API schema.
     220 + Value string `json:"value"`
     221 + }
     222 + 
     223 + // Configurations defines the set of product configurations for a
     224 + // NVD applicability statement as defined in the NIST API schema.
     225 + Configurations struct {
     226 + CVEDataVersion string `json:"CVE_data_version"`
     227 + Nodes []Node `json:"nodes,omitempty"`
     228 + }
     229 + 
     230 + // Node is a node or sub-node in an NVD applicability statement
     231 + // as defined in the NIST API schema.
     232 + Node struct {
     233 + Operator string `json:"operator,omitempty"`
     234 + Negate bool `json:"negate,omitempty"`
     235 + Children []Node `json:"children,omitempty"`
     236 + CPEMatch []CPEMatch `json:"cpe_match,omitempty"`
     237 + }
     238 + 
     239 + // CPEMatch is the CPE Match string or range as defined in the
     240 + // NIST API schema.
     241 + CPEMatch struct {
     242 + Vulnerable bool `json:"vulnerable"`
     243 + CPE22URI string `json:"cpe22Uri,omitempty"`
     244 + CPE23URI string `json:"cpe23Uri"`
     245 + VersionStartExcluding string `json:"versionStartExcluding,omitempty"`
     246 + VersionStartIncluding string `json:"versionStartIncluding,omitempty"`
     247 + VersionEndExcluding string `json:"versionEndExcluding,omitempty"`
     248 + VersionEndIncluding string `json:"versionEndIncluding,omitempty"`
     249 + CPEName []CVECPEName `json:"cpe_name,omitempty"`
     250 + }
     251 + 
     252 + // CPEName is the CPE name as defined in the NIST API schema.
     253 + CVECPEName struct {
     254 + CPE22URI string `json:"cpe22Uri,omitempty"`
     255 + CPE23URI string `json:"cpe23Uri"`
     256 + LastModifiedDate string `json:"lastModifiedDate,omitempty"`
     257 + }
     258 + 
     259 + // Impact scores for a vulnerability as found on NVD as defined
     260 + // in the NIST API schema.
     261 + Impact struct {
     262 + BaseMetricV3 BaseMetricV3 `json:"baseMetricV3,omitempty"`
     263 + BaseMetricV2 BaseMetricV2 `json:"baseMetricV2,omitempty"`
     264 + }
     265 + 
     266 + // BaseMetricV3 is the CVSS V3.x score as defined in the NIST API
     267 + // schema.
     268 + BaseMetricV3 struct {
     269 + CVSSV3 CVSSV3 `json:"cvssV3,omitempty"`
     270 + ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"`
     271 + ImpactScore float64 `json:"impactScore,omitempty"`
     272 + }
     273 + 
     274 + CVSSV3 struct {
     275 + // Version should be implemented using an enum
     276 + Version string `json:"version"`
     277 + VectorString string `json:"vectorString"`
     278 + AttackVector string `json:"attackVector,omitempty"`
     279 + AttackComplexity string `json:"attackComplexity,omitempty"`
     280 + PrivilegesRequired string `json:"privilegesRequired,omitempty"`
     281 + UserInteraction string `json:"userInteraction,omitempty"`
     282 + Scope string `json:"scope,omitempty"`
     283 + ConfidentialityImpact string `json:"confidentialityImpact,omitempty"`
     284 + IntegrityImpact string `json:"integrityImpact,omitempty"`
     285 + AvailabilityImpact string `json:"availabilityImpact,omitempty"`
     286 + BaseScore float64 `json:"baseScore"`
     287 + BaseSeverity string `json:"baseSeverity"`
     288 + ExploitCodeMaturity string `json:"exploitCodeMaturity,omitempty"`
     289 + RemediationLevel string `json:"remediationLevel,omitempty"`
     290 + ReportConfidence string `json:"reportConfidence,omitempty"`
     291 + TemporalScore float64 `json:"temporalScore,omitempty"`
     292 + TemporalSeverity string `json:"temporalSeverity,omitempty"`
     293 + ConfidentialityRequirement string `json:"confidentialityRequirement,omitempty"`
     294 + IntegrityRequirement string `json:"integrityRequirement,omitempty"`
     295 + AvailabilityRequirement string `json:"availabilityRequirement,omitempty"`
     296 + ModifiedAttackVector string `json:"modifiedAttackVector,omitempty"`
     297 + ModifiedAttackComplexity string `json:"modifiedAttackComplexity,omitempty"`
     298 + ModifiedPrivilegesRequired string `json:"modifiedPrivilegesRequired,omitempty"`
     299 + ModifiedUserInteraction string `json:"modifiedUserInteraction,omitempty"`
     300 + ModifiedScope string `json:"modifiedScope,omitempty"`
     301 + ModifiedConfidentialityImpact string `json:"modifiedConfidentialityImpact,omitempty"`
     302 + ModifiedIntegrityImpact string `json:"modifiedIntegrityImpact,omitempty"`
     303 + ModifiedAvailabilityImpact string `json:"modifiedAvailabilityImpact,omitempty"`
     304 + EnvironmentalScore float64 `json:"environmentalScore,omitempty"`
     305 + EnvironmentalSeverity string `json:"environmentalSeverity,omitempty"`
     306 + }
     307 + 
     308 + // BaseMetricV2 is the CVSS V2.0 score as defined in the NIST API
     309 + // schema.
     310 + BaseMetricV2 struct {
     311 + CVSSV2 CVSSV2 `json:"cvssV2,omitempty"`
     312 + Severity string `json:"severity,omitempty"`
     313 + ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"`
     314 + ImpactScore float64 `json:"impactScore,omitempty"`
     315 + AcInsufInfo bool `json:"acInsufInfo,omitempty"`
     316 + ObtainAllPrivilege bool `json:"obtainAllPrivilege,omitempty"`
     317 + ObtainUserPrivilege bool `json:"obtainUserPrivilege,omitempty"`
     318 + ObtainOtherPrivilege bool `json:"obtainOtherPrivilege,omitempty"`
     319 + UserInteractionRequired bool `json:"userInteractionRequired,omitempty"`
     320 + }
     321 + 
     322 + CVSSV2 struct {
     323 + Version string `json:"version"`
     324 + VectorString string `json:"vectorString"`
     325 + AccessVector string `json:"accessVector,omitempty"`
     326 + AccessComplexity string `json:"accessComplexity,omitempty"`
     327 + Authentication string `json:"authentication,omitempty"`
     328 + ConfidentialityImpact string `json:"confidentialityImpact,omitempty"`
     329 + IntegrityImpact string `json:"integrityImpact,omitempty"`
     330 + AvailabilityImpact string `json:"availabilityImpact,omitempty"`
     331 + BaseScore float64 `json:"baseScore"`
     332 + Exploitability string `json:"exploitability,omitempty"`
     333 + RemediationLevel string `json:"remediationLevel,omitempty"`
     334 + ReportConfidence string `json:"reportConfidence,omitempty"`
     335 + TemporalScore float64 `json:"temporalScore,omitempty"`
     336 + CollateralDamagePotential string `json:"collateralDamagePotential,omitempty"`
     337 + TargetDistribution string `json:"targetDistribution,omitempty"`
     338 + ConfidentialityRequirement string `json:"confidentialityRequirement,omitempty"`
     339 + IntegrityRequirement string `json:"integrityRequirement,omitempty"`
     340 + AvailabilityRequirement string `json:"availabilityRequirement,omitempty"`
     341 + EnvironmentalScore float64 `json:"environmentalScore,omitempty"`
     342 + }
     343 + 
     344 + CPEResponse struct {
     345 + ResultsPerPage int `json:"resultsPerPage"`
     346 + StartIndex int `json:"startIndex"`
     347 + TotalResults int `json:"totalResults"`
     348 + Result CPEResult `json:"result"`
     349 + }
     350 + 
     351 + CPEResult struct {
     352 + DataType string `json:"dataType"`
     353 + FeedVersion string `json:"feedVersion"`
     354 + // Number of CPE in this feed
     355 + CPECount int `json:"cpeCount"`
     356 + // Timestamp indicates when feed was generated
     357 + FeedTimestamp *string `json:"feedTimestamp,omitempty"`
     358 + CPEs []CPEName `json:"cpes"`
     359 + }
     360 + 
     361 + // CPE name
     362 + CPEName struct {
     363 + CPE23URI string `json:"cpe23Uri"`
     364 + LastModifiedDate string `json:"lastModifiedDate"`
     365 + Deprecated bool `json:"deprecated,omitempty"`
     366 + DeprecatedBy []string `json:"deprecatedBy,omitempty"`
     367 + Titles []Title `json:"titles,omitempty"`
     368 + Refs []CPEReference `json:"refs,omitempty"`
     369 + Vulnerabilities []string `json:"vulnerabilities,omitempty"`
     370 + }
     371 + 
     372 + // Human readable title for CPE
     373 + Title struct {
     374 + Title string `json:"title"`
     375 + Lang string `json:"lang"`
     376 + }
     377 + 
     378 + // Internet resource for CPE
     379 + CPEReference struct {
     380 + Ref string `json:"ref"`
     381 + Type CPEReferenceType `json:"type,omitempty"`
     382 + }
     383 + 
     384 + CPEReferenceType string
     385 +)
     386 + 
     387 +var (
     388 + ADVISORY CPEReferenceType = "Advisory"
     389 + CHANGE_LOG CPEReferenceType = "Change Log"
     390 + PRODUCT CPEReferenceType = "Product"
     391 + PROJECT CPEReferenceType = "Project"
     392 + VENDOR CPEReferenceType = "Vendor"
     393 + VERSION CPEReferenceType = "Version"
     394 +)
     395 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/nmap/nmap.go
     1 +package siriusNmap
     2 + 
     3 +import (
     4 + "fmt"
     5 + "log"
     6 + "strings"
     7 + 
     8 + "github.com/lair-framework/go-nmap"
     9 +)
     10 + 
     11 +const (
     12 + version = "2.1.1"
     13 + tool = "nmap"
     14 + osWeight = 50
     15 +)
     16 + 
     17 +//Nmap Discovery Scan Options / Parser / Execution
     18 +func NmapDiscovery(n int) string {
     19 + fmt.Println("JSON decode error!")
     20 + return "asdf"
     21 +}
     22 + 
     23 +func ProcessReport(nmapXML []byte) []CVE {
     24 + 
     25 + nmapRun, err := nmap.Parse(nmapXML)
     26 + if err != nil {
     27 + log.Fatalf("Fatal: Error parsing nmap. Error %s", err.Error())
     28 + }
     29 + 
     30 + scan := handleXML(nmapRun)
     31 + 
     32 + return scan
     33 +}
     34 + 
     35 +func handleXML(run *nmap.NmapRun) []CVE {
     36 + var scan Scan
     37 + var cvelist []CVE
     38 + 
     39 + // Convert the NmapRun struct to a SVDBHost struct
     40 + //var host siriusDB.SVDBHost
     41 + //host.OS = run.Hosts[0].Os.OsMatches[0].Name
     42 + 
     43 + //CVEs from HostScript Output
     44 + for j := 0; j < len(run.Hosts[0].HostScripts); j++ {
     45 + scriptOutput := run.Hosts[0].HostScripts[j].Output
     46 + 
     47 + for _, line := range strings.Split(strings.TrimSuffix(scriptOutput, "\n"), "\n") {
     48 + if strings.Contains(line, "CVE-") {
     49 + //log.Println(line)
     50 + cveid := strings.Split(line, "CVE-")[1]
     51 + 
     52 + if len(cveid) > 9 {
     53 + cveid = cveid[:10]
     54 + cvelist = append(cvelist, CVE{CVEID: cveid})
     55 + } else {
     56 + cveid = cveid[:9]
     57 + cvelist = append(cvelist, CVE{CVEID: cveid})
     58 + }
     59 + }
     60 + }
     61 + }
     62 + 
     63 + // THIS IS GHETTO AND BAD AND I SHOULD FEEL BAD - but it works for now
     64 + for i := 0; i < len(run.Hosts[0].Ports); i++ {
     65 + 
     66 + //CVEs from Port Script Output
     67 + for j := 0; j < len(run.Hosts[0].Ports[i].Scripts); j++ {
     68 + 
     69 + scriptOutput := run.Hosts[0].Ports[i].Scripts[j].Output
     70 + 
     71 + for _, line := range strings.Split(strings.TrimSuffix(scriptOutput, "\n"), "\n") {
     72 + if strings.Contains(line, "CVE-") {
     73 + //log.Println(line)
     74 + cveid := strings.Split(line, "CVE-")[1]
     75 + 
     76 + if len(cveid) > 9 {
     77 + cveid = cveid[:10]
     78 + cvelist = append(cvelist, CVE{CVEID: cveid})
     79 + } else {
     80 + cveid = cveid[:9]
     81 + cvelist = append(cvelist, CVE{CVEID: cveid})
     82 + }
     83 + }
     84 + }
     85 + }
     86 + }
     87 + 
     88 + for _, h := range run.Hosts {
     89 + host := Host{ID: "1"}
     90 + if h.Status.State != "up" {
     91 + continue
     92 + }
     93 + 
     94 + for _, address := range h.Addresses {
     95 + switch {
     96 + case address.AddrType == "ipv4":
     97 + host.IPv4 = address.Addr
     98 + case address.AddrType == "mac":
     99 + host.MAC = address.Addr
     100 + }
     101 + }
     102 + 
     103 + for _, hostname := range h.Hostnames {
     104 + host.Hostnames = append(host.Hostnames, hostname.Name)
     105 + }
     106 + 
     107 + //Service Detection
     108 + for _, p := range h.Ports {
     109 + service := Service{}
     110 + service.Port = p.PortId
     111 + service.Protocol = p.Protocol
     112 + 
     113 + if p.State.State != "open" {
     114 + continue
     115 + }
     116 + 
     117 + if p.Service.Name != "" {
     118 + service.Service = p.Service.Name
     119 + service.Product = "Unknown"
     120 + if p.Service.Product != "" {
     121 + service.Product = p.Service.Product
     122 + if p.Service.Version != "" {
     123 + service.Product += " " + p.Service.Version
     124 + }
     125 + }
     126 + 
     127 + if p.Service.CPEs != nil {
     128 + service.CPE = p.Service.CPEs
     129 + }
     130 + }
     131 + 
     132 + host.Services = append(host.Services, service)
     133 + }
     134 + 
     135 + scan.Hosts = append(scan.Hosts, host)
     136 + 
     137 + }
     138 + 
     139 + return cvelist
     140 +}
     141 + 
  • ■ ■ ■ ■ ■ ■
    Engine/lib/nmap/nmaplib.go
     1 +package siriusNmap
     2 + 
     3 +import (
     4 + "github.com/lair-framework/go-nmap"
     5 +)
     6 + 
     7 + 
     8 +// CPE (Common Platform Enumeration) is a standardized way to name software
     9 +type Service struct {
     10 + ID string `json:"_id" bson:"_id"`
     11 + ProjectID string `json:"projectId" bson:"projectId"`
     12 + HostID string `json:"hostId" bson:"hostId"`
     13 + Port int `json:"port" bson:"port"`
     14 + Protocol string `json:"protocol" bson:"protocol"`
     15 + Service string `json:"service" bson:"service"`
     16 + Product string `json:"product" bson:"product"`
     17 + Status string `json:"status" bson:"status"`
     18 + IsFlagged bool `json:"isFlagged" bson:"isFlagged"`
     19 + LastModifiedBy string `json:"lastModifiedBy" bson:"lastModifiedBy"`
     20 + CPE []nmap.CPE `json:"cpe" bson:"cpe"`
     21 +}
     22 + 
     23 +type Host struct {
     24 + ID string `json:"_id" bson:"_id"`
     25 + ProjectID string `json:"projectId" bson:"projectId"`
     26 + LongIPv4Addr uint64 `json:"longIpv4Addr" bson:"longIpv4Addr"`
     27 + IPv4 string `json:"ipv4" bson:"ipv4"`
     28 + MAC string `json:"mac" bson:"mac"`
     29 + Hostnames []string `json:"hostnames" bson:"hostnames"`
     30 + StatusMessage string `json:"statusMessage" bson:"statusMessage"`
     31 + Tags []string `json:"tags" bson:"tags"`
     32 + Status string `json:"status" bson:"status"`
     33 + LastModifiedBy string `json:"lastModifiedBy" bson:"lastModifiedBy"`
     34 + IsFlagged bool `json:"isFlagged" bson:"isFlagged"`
     35 + Services []Service `json:"services"`
     36 + CVE []CVE `json:"cve"`
     37 +}
     38 + 
     39 +type Scan struct {
     40 + ID string `json:"_id" bson:"_id"`
     41 + Tool string `json:"tool"`
     42 + Hosts []Host `json:"hosts"`
     43 +}
     44 + 
     45 + 
     46 +// OS fingerprint for a host.
     47 +type OS struct {
     48 + Tool string `json:"tool" bson:"tool"`
     49 + Weight int `json:"weight" bson:"weight"`
     50 + Fingerprint string `json:"fingerprint" bson:"fingerprint"`
     51 +}
     52 + 
     53 + 
     54 +type CVE struct {
     55 + CVEID string `json:"cveid"`
     56 +}
     57 + 
     58 + 
     59 + 
     60 + 
     61 + 
     62 + 
  • ■ ■ ■ ■ ■ ■
    Engine/sirius.go
     1 +// Sirius Scanning Engine
     2 +package main
     3 + 
     4 +import (
     5 + "encoding/json"
     6 + "fmt"
     7 + "log"
     8 + 
     9 + core "github.com/0sm0s1z/Sirius-Scan/Engine/core"
     10 + lib "github.com/0sm0s1z/Sirius-Scan/Engine/lib"
     11 + "github.com/streadway/amqp"
     12 +)
     13 + 
     14 +func failOnError(err error, msg string) {
     15 + if err != nil {
     16 + log.Fatalf("%s: %s", msg, err)
     17 + }
     18 +}
     19 + 
     20 +// Engine is the main scanning engine
     21 +func main() {
     22 + fmt.Println("Sirius Scanning Engine")
     23 + 
     24 + conn, err := amqp.Dial("amqp://guest:guest@rabbitmq:5672/")
     25 + failOnError(err, "Failed to connect to RabbitMQ")
     26 + defer conn.Close()
     27 + 
     28 + ch, err := conn.Channel()
     29 + failOnError(err, "Failed to open a channel")
     30 + defer ch.Close()
     31 + 
     32 + q, err := ch.QueueDeclare(
     33 + "scan", // name
     34 + false, // durable
     35 + false, // delete when unused
     36 + false, // exclusive
     37 + false, // no-wait
     38 + nil, // arguments
     39 + )
     40 + failOnError(err, "Failed to declare a queue")
     41 + 
     42 + msgs, err := ch.Consume(
     43 + q.Name, // queue
     44 + "", // consumer
     45 + true, // auto-ack
     46 + false, // exclusive
     47 + false, // no-local
     48 + false, // no-wait
     49 + nil, // args
     50 + )
     51 + failOnError(err, "Failed to register a consumer")
     52 + 
     53 + /*
     54 + Main loop for the engine
     55 + - Listen for messages
     56 + - Execute scan based on message contents
     57 + - Send results back to the queue
     58 + */
     59 + forever := make(chan bool)
     60 + 
     61 + go func() {
     62 + for d := range msgs {
     63 + // Execute & Manage scans based on massage contents
     64 + var scanRequest lib.ScanRequest
     65 + err := json.Unmarshal(d.Body, &scanRequest)
     66 + if err != nil {
     67 + fmt.Println("JSON Unmarshal format error!", err)
     68 + }
     69 + 
     70 + // Case Statement for scan tracking
     71 + switch scanRequest.Command {
     72 + case "new":
     73 + // Execute the scan
     74 + log.Println("=== New Scan Requested ===")
     75 + // Spawn a new scan
     76 + go func() {
     77 + core.NewScan(scanRequest)
     78 + }()
     79 + case "report":
     80 + // Stop the scan
     81 + log.Println("Scan Stopped")
     82 + case "scanDiscovery":
     83 + // Stop the scan
     84 + log.Println("Scan Stopped")
     85 + case "scanVulnerability":
     86 + // Stop the scan
     87 + log.Println("Scan Stopped")
     88 + }
     89 + }
     90 + }()
     91 + 
     92 + log.Printf(" [*] Sirius Scanning Engine Started. Waiting for scan requests. To exit press CTRL+C")
     93 + <-forever
     94 +}
     95 + 
  • ■ ■ ■ ■ ■ ■
    Engine/tmp/192.168.86.20-nmapportscan.xml
     1 +<?xml version="1.0" encoding="UTF-8"?>
     2 +<!DOCTYPE nmaprun>
     3 +<?xml-stylesheet href="file:///usr/bin/../share/nmap/nmap.xsl" type="text/xsl"?>
     4 +<!-- Nmap 7.80 scan initiated Thu Mar 9 00:35:53 2023 as: nmap -sV -&#45;script=vuln,vulners -oX /tmp/sirius/scan-U00IgtI8cK/192.168.86.20-nmapportscan.xml 192.168.86.20 -->
     5 +<nmaprun scanner="nmap" args="nmap -sV -&#45;script=vuln,vulners -oX /tmp/sirius/scan-U00IgtI8cK/192.168.86.20-nmapportscan.xml 192.168.86.20" start="1678322153" startstr="Thu Mar 9 00:35:53 2023" version="7.80" xmloutputversion="1.04">
     6 +<scaninfo type="syn" protocol="tcp" numservices="1000" services="1,3-4,6-7,9,13,17,19-26,30,32-33,37,42-43,49,53,70,79-85,88-90,99-100,106,109-111,113,119,125,135,139,143-144,146,161,163,179,199,211-212,222,254-256,259,264,280,301,306,311,340,366,389,406-407,416-417,425,427,443-445,458,464-465,481,497,500,512-515,524,541,543-545,548,554-555,563,587,593,616-617,625,631,636,646,648,666-668,683,687,691,700,705,711,714,720,722,726,749,765,777,783,787,800-801,808,843,873,880,888,898,900-903,911-912,981,987,990,992-993,995,999-1002,1007,1009-1011,1021-1100,1102,1104-1108,1110-1114,1117,1119,1121-1124,1126,1130-1132,1137-1138,1141,1145,1147-1149,1151-1152,1154,1163-1166,1169,1174-1175,1183,1185-1187,1192,1198-1199,1201,1213,1216-1218,1233-1234,1236,1244,1247-1248,1259,1271-1272,1277,1287,1296,1300-1301,1309-1311,1322,1328,1334,1352,1417,1433-1434,1443,1455,1461,1494,1500-1501,1503,1521,1524,1533,1556,1580,1583,1594,1600,1641,1658,1666,1687-1688,1700,1717-1721,1723,1755,1761,1782-1783,1801,1805,1812,1839-1840,1862-1864,1875,1900,1914,1935,1947,1971-1972,1974,1984,1998-2010,2013,2020-2022,2030,2033-2035,2038,2040-2043,2045-2049,2065,2068,2099-2100,2103,2105-2107,2111,2119,2121,2126,2135,2144,2160-2161,2170,2179,2190-2191,2196,2200,2222,2251,2260,2288,2301,2323,2366,2381-2383,2393-2394,2399,2401,2492,2500,2522,2525,2557,2601-2602,2604-2605,2607-2608,2638,2701-2702,2710,2717-2718,2725,2800,2809,2811,2869,2875,2909-2910,2920,2967-2968,2998,3000-3001,3003,3005-3007,3011,3013,3017,3030-3031,3052,3071,3077,3128,3168,3211,3221,3260-3261,3268-3269,3283,3300-3301,3306,3322-3325,3333,3351,3367,3369-3372,3389-3390,3404,3476,3493,3517,3527,3546,3551,3580,3659,3689-3690,3703,3737,3766,3784,3800-3801,3809,3814,3826-3828,3851,3869,3871,3878,3880,3889,3905,3914,3918,3920,3945,3971,3986,3995,3998,4000-4006,4045,4111,4125-4126,4129,4224,4242,4279,4321,4343,4443-4446,4449,4550,4567,4662,4848,4899-4900,4998,5000-5004,5009,5030,5033,5050-5051,5054,5060-5061,5080,5087,5100-5102,5120,5190,5200,5214,5221-5222,5225-5226,5269,5280,5298,5357,5405,5414,5431-5432,5440,5500,5510,5544,5550,5555,5560,5566,5631,5633,5666,5678-5679,5718,5730,5800-5802,5810-5811,5815,5822,5825,5850,5859,5862,5877,5900-5904,5906-5907,5910-5911,5915,5922,5925,5950,5952,5959-5963,5987-5989,5998-6007,6009,6025,6059,6100-6101,6106,6112,6123,6129,6156,6346,6389,6502,6510,6543,6547,6565-6567,6580,6646,6666-6669,6689,6692,6699,6779,6788-6789,6792,6839,6881,6901,6969,7000-7002,7004,7007,7019,7025,7070,7100,7103,7106,7200-7201,7402,7435,7443,7496,7512,7625,7627,7676,7741,7777-7778,7800,7911,7920-7921,7937-7938,7999-8002,8007-8011,8021-8022,8031,8042,8045,8080-8090,8093,8099-8100,8180-8181,8192-8194,8200,8222,8254,8290-8292,8300,8333,8383,8400,8402,8443,8500,8600,8649,8651-8652,8654,8701,8800,8873,8888,8899,8994,9000-9003,9009-9011,9040,9050,9071,9080-9081,9090-9091,9099-9103,9110-9111,9200,9207,9220,9290,9415,9418,9485,9500,9502-9503,9535,9575,9593-9595,9618,9666,9876-9878,9898,9900,9917,9929,9943-9944,9968,9998-10004,10009-10010,10012,10024-10025,10082,10180,10215,10243,10566,10616-10617,10621,10626,10628-10629,10778,11110-11111,11967,12000,12174,12265,12345,13456,13722,13782-13783,14000,14238,14441-14442,15000,15002-15004,15660,15742,16000-16001,16012,16016,16018,16080,16113,16992-16993,17877,17988,18040,18101,18988,19101,19283,19315,19350,19780,19801,19842,20000,20005,20031,20221-20222,20828,21571,22939,23502,24444,24800,25734-25735,26214,27000,27352-27353,27355-27356,27715,28201,30000,30718,30951,31038,31337,32768-32785,33354,33899,34571-34573,35500,38292,40193,40911,41511,42510,44176,44442-44443,44501,45100,48080,49152-49161,49163,49165,49167,49175-49176,49400,49999-50003,50006,50300,50389,50500,50636,50800,51103,51493,52673,52822,52848,52869,54045,54328,55055-55056,55555,55600,56737-56738,57294,57797,58080,60020,60443,61532,61900,62078,63331,64623,64680,65000,65129,65389"/>
     7 +<verbose level="0"/>
     8 +<debugging level="0"/>
     9 +<host starttime="1678322163" endtime="1678322243"><status state="up" reason="reset" reason_ttl="37"/>
     10 +<address addr="192.168.86.20" addrtype="ipv4"/>
     11 +<hostnames>
     12 +<hostname name="sans-sec460.lan" type="PTR"/>
     13 +</hostnames>
     14 +<ports><extraports state="closed" count="995">
     15 +<extrareasons reason="resets" count="995"/>
     16 +</extraports>
     17 +<port protocol="tcp" portid="22"><state state="open" reason="syn-ack" reason_ttl="37"/><service name="ssh" product="OpenSSH" version="for_Windows_8.0" extrainfo="protocol 2.0" method="probed" conf="10"><cpe>cpe:/a:openbsd:openssh:for_windows_8.0</cpe></service><script id="clamav-exec" output="ERROR: Script execution failed (use -d to debug)"/></port>
     18 +<port protocol="tcp" portid="80"><state state="open" reason="syn-ack" reason_ttl="37"/><service name="http" product="nginx" version="1.13.5" method="probed" conf="10"><cpe>cpe:/a:igor_sysoev:nginx:1.13.5</cpe></service><script id="clamav-exec" output="ERROR: Script execution failed (use -d to debug)"/><script id="http-csrf" output="Couldn&apos;t find any CSRF vulnerabilities."/><script id="http-dombased-xss" output="Couldn&apos;t find any DOM based XSS."/><script id="http-server-header" output="nginx/1.13.5"><elem>nginx/1.13.5</elem>
     19 +</script><script id="http-stored-xss" output="Couldn&apos;t find any stored XSS vulnerabilities."/><script id="http-vuln-cve2011-3192" output="&#xa; VULNERABLE:&#xa; Apache byterange filter DoS&#xa; State: VULNERABLE&#xa; IDs: BID:49303 CVE:CVE-2011-3192&#xa; The Apache web server is vulnerable to a denial of service attack when numerous&#xa; overlapping byte ranges are requested.&#xa; Disclosure date: 2011-08-19&#xa; References:&#xa; https://www.securityfocus.com/bid/49303&#xa; https://www.tenable.com/plugins/nessus/55976&#xa; https://seclists.org/fulldisclosure/2011/Aug/175&#xa; https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3192&#xa;"><table key="CVE-2011-3192">
     20 +<elem key="title">Apache byterange filter DoS</elem>
     21 +<elem key="state">VULNERABLE</elem>
     22 +<table key="ids">
     23 +<elem>BID:49303</elem>
     24 +<elem>CVE:CVE-2011-3192</elem>
     25 +</table>
     26 +<table key="description">
     27 +<elem>The Apache web server is vulnerable to a denial of service attack when numerous&#xa;overlapping byte ranges are requested.</elem>
     28 +</table>
     29 +<table key="dates">
     30 +<table key="disclosure">
     31 +<elem key="day">19</elem>
     32 +<elem key="month">08</elem>
     33 +<elem key="year">2011</elem>
     34 +</table>
     35 +</table>
     36 +<elem key="disclosure">2011-08-19</elem>
     37 +<table key="refs">
     38 +<elem>https://www.securityfocus.com/bid/49303</elem>
     39 +<elem>https://www.tenable.com/plugins/nessus/55976</elem>
     40 +<elem>https://seclists.org/fulldisclosure/2011/Aug/175</elem>
     41 +<elem>https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3192</elem>
     42 +</table>
     43 +</table>
     44 +</script></port>
     45 +<port protocol="tcp" portid="135"><state state="open" reason="syn-ack" reason_ttl="37"/><service name="msrpc" product="Microsoft Windows RPC" ostype="Windows" method="probed" conf="10"><cpe>cpe:/o:microsoft:windows</cpe></service><script id="clamav-exec" output="ERROR: Script execution failed (use -d to debug)"/></port>
     46 +<port protocol="tcp" portid="139"><state state="open" reason="syn-ack" reason_ttl="37"/><service name="netbios-ssn" product="Microsoft Windows netbios-ssn" ostype="Windows" method="probed" conf="10"><cpe>cpe:/o:microsoft:windows</cpe></service><script id="clamav-exec" output="ERROR: Script execution failed (use -d to debug)"/></port>
     47 +<port protocol="tcp" portid="445"><state state="open" reason="syn-ack" reason_ttl="37"/><service name="microsoft-ds" product="Microsoft Windows 7 - 10 microsoft-ds" extrainfo="workgroup: WORKGROUP" hostname="SANS-SEC460" ostype="Windows" method="probed" conf="10"><cpe>cpe:/o:microsoft:windows</cpe></service><script id="clamav-exec" output="ERROR: Script execution failed (use -d to debug)"/></port>
     48 +</ports>
     49 +<hostscript><script id="samba-vuln-cve-2012-1182" output="NT_STATUS_ACCESS_DENIED">false</script><script id="smb-vuln-ms10-054" output="false">false</script><script id="smb-vuln-ms10-061" output="NT_STATUS_ACCESS_DENIED">false</script><script id="smb-vuln-ms17-010" output="&#xa; VULNERABLE:&#xa; Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010)&#xa; State: VULNERABLE&#xa; IDs: CVE:CVE-2017-0143&#xa; Risk factor: HIGH&#xa; A critical remote code execution vulnerability exists in Microsoft SMBv1&#xa; servers (ms17-010).&#xa; &#xa; Disclosure date: 2017-03-14&#xa; References:&#xa; https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/&#xa; https://technet.microsoft.com/en-us/library/security/ms17-010.aspx&#xa; https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143&#xa;"><table key="CVE-2017-0143">
     50 +<elem key="title">Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010)</elem>
     51 +<elem key="state">VULNERABLE</elem>
     52 +<table key="ids">
     53 +<elem>CVE:CVE-2017-0143</elem>
     54 +</table>
     55 +<table key="description">
     56 +<elem>A critical remote code execution vulnerability exists in Microsoft SMBv1&#xa; servers (ms17-010).&#xa; </elem>
     57 +</table>
     58 +<table key="dates">
     59 +<table key="disclosure">
     60 +<elem key="day">14</elem>
     61 +<elem key="month">03</elem>
     62 +<elem key="year">2017</elem>
     63 +</table>
     64 +</table>
     65 +<elem key="disclosure">2017-03-14</elem>
     66 +<table key="refs">
     67 +<elem>https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/</elem>
     68 +<elem>https://technet.microsoft.com/en-us/library/security/ms17-010.aspx</elem>
     69 +<elem>https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143</elem>
     70 +</table>
     71 +</table>
     72 +</script></hostscript><times srtt="885927" rttvar="250240" to="1886887"/>
     73 +</host>
     74 +<runstats><finished time="1678322243" timestr="Thu Mar 9 00:37:23 2023" elapsed="90.56" summary="Nmap done at Thu Mar 9 00:37:23 2023; 1 IP address (1 host up) scanned in 90.56 seconds" exit="success"/><hosts up="1" down="0" total="1"/>
     75 +</runstats>
     76 +</nmaprun>
     77 + 
  • ■ ■ ■ ■ ■
    Engine/tmp/build-errors.log
     1 +exit status 2exit status 2exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 1exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1
  • Engine/tmp/sirius
    Binary file.
Please wait...
Page is in error, reload to recover