Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Desktop Protocol #97

Open
wants to merge 11 commits into
base: onionscan-0.2
Choose a base branch
from
4 changes: 4 additions & 0 deletions onionscan/onionscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func (os *OnionScan) GetAllActions() []string {
"tls",
"ssh",
"irc",
"rdp",
"ricochet",
"ftp",
"smtp",
Expand Down Expand Up @@ -47,6 +48,9 @@ func (os *OnionScan) PerformNextAction(report *report.OnionScanReport, nextActio
case "irc":
ips := new(protocol.IRCProtocolScanner)
ips.ScanProtocol(report.HiddenService, os.Config, report)
case "rdp":
rdps := new(protocol.RDPProtocolScanner)
rdps.ScanProtocol(report.HiddenService, os.Config, report)
case "ricochet":
rps := new(protocol.RicochetProtocolScanner)
rps.ScanProtocol(report.HiddenService, os.Config, report)
Expand Down
1 change: 0 additions & 1 deletion protocol/http_scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"github.com/s-rah/onionscan/config"
"github.com/s-rah/onionscan/report"

"github.com/s-rah/onionscan/spider"
"github.com/s-rah/onionscan/utils"
"net/http"
Expand Down
28 changes: 28 additions & 0 deletions protocol/rdp_scanner.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package protocol

import (
"fmt"
"github.com/s-rah/onionscan/config"
"github.com/s-rah/onionscan/report"
"github.com/s-rah/onionscan/utils"
)

type RDPProtocolScanner struct {
}

func (rdps *RDPProtocolScanner) ScanProtocol(hiddenService string, osc *config.OnionScanConfig, report *report.OnionScanReport) {
// RDP
osc.LogInfo(fmt.Sprintf("Checking %s RDP(3389)\n", hiddenService))
conn, err := utils.GetNetworkConnection(hiddenService, 3389, osc.TorProxyAddress, osc.Timeout)
if err != nil {
osc.LogInfo("Failed to connect to service on port 3389\n")
report.RDPDetected = false
} else {
osc.LogInfo("Detected possible RDP instance\n")
// TODO: Actual Analysis
report.RDPDetected = true
}
if conn != nil {
conn.Close()
}
}
1 change: 1 addition & 0 deletions report/onionscanreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type OnionScanReport struct {
TLSDetected bool `json:"tlsDetected"`
SSHDetected bool `json:"sshDetected"`
RicochetDetected bool `json:"ricochetDetected"`
RDPDetected bool `json:"rdpDetected"`
IRCDetected bool `json:"ircDetected"`
FTPDetected bool `json:"ftpDetected"`
SMTPDetected bool `json:"smtpDetected"`
Expand Down