Skip to content

Commit d885db2

Browse files
committed
add vnc password crack 2022-08-06
1 parent b0626ea commit d885db2

File tree

13 files changed

+1092
-5
lines changed

13 files changed

+1092
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
Code-level optimization, parameter optimization, and individual modules, such as vscan filefuzz, have been rewritten for these integrated projects.
2121
In principle, do not repeat the wheel, unless there are bugs, problems
2222
- Cross-platform: based on golang implementation, lightweight, highly customizable, open source, supports Linux, windows, mac os, etc.
23-
- Support [22] password blasting, support custom dictionary, open by "priorityNmap": true
23+
- Support [23] password blasting, support custom dictionary, open by "priorityNmap": true
2424
* RDP
25+
* VNC
2526
* SSH
2627
* Socks5
2728
* rsh-spx

README_CN.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</p>
1212

1313
# 特性
14-
Vulnerabilities Scan;15000+PoC漏洞扫描;22种应用弱口令爆破;7000+Web指纹;146种协议90000+规则Port扫描;Fuzz、HW打点、BugBounty神器...
14+
Vulnerabilities Scan;15000+PoC漏洞扫描;[ 23 ] 种应用弱口令爆破;7000+Web指纹;146种协议90000+规则Port扫描;Fuzz、HW打点、BugBounty神器...
1515
<h1 align="center">
1616
<img width="928" alt="image" src="https://user-images.githubusercontent.com/18223385/175768227-098c779b-6c5f-48ee-91b1-c56e3daa9c87.png">
1717
</h1>
@@ -20,8 +20,9 @@ Vulnerabilities Scan;15000+PoC漏洞扫描;22种应用弱口令爆破;7000
2020
并对这些集成的项目进行代码级别优化、参数优化,个别模块,如 vscan filefuzz部分进行了重写
2121
原则上不重复造轮子,除非存在bug、问题
2222
- 跨平台:基于golang实现,轻量级、高度可定制、开源,支持Linux、windows、mac os等
23-
- 支持【22】种密码爆破,支持自定义字典, 通过 "priorityNmap": true 开启
23+
- 支持[ 23 ] 种密码爆破,支持自定义字典, 通过 "priorityNmap": true 开启
2424
* RDP
25+
* VNC
2526
* SSH
2627
* Socks5
2728
* rsh-spx

pkg/hydra/cracker.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/hktalent/scan4all/pkg/hydra/socks5"
1919
"github.com/hktalent/scan4all/pkg/hydra/ssh"
2020
"github.com/hktalent/scan4all/pkg/hydra/telnet"
21+
"github.com/hktalent/scan4all/pkg/hydra/vnc"
2122
"github.com/hktalent/scan4all/pkg/hydra/winrm"
2223
"github.com/hktalent/scan4all/pkg/kscan/core/slog"
2324
"github.com/hktalent/scan4all/pkg/kscan/lib/gotelnet"
@@ -66,6 +67,13 @@ func Socks5Cracker(i interface{}) interface{} {
6667
}
6768
return nil
6869
}
70+
func VncCracker(i interface{}) interface{} {
71+
info := i.(AuthInfo)
72+
if ok, _ := vnc.Check(info.IPAddr, info.Auth.Username, info.Auth.Password, info.Port); ok {
73+
return info
74+
}
75+
return nil
76+
}
6977

7078
func sshCracker(i interface{}) interface{} {
7179
info := i.(AuthInfo)

pkg/hydra/doNmapResult.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func DoParseXml(s string, bf *bytes.Buffer) {
8484
m1[ip] = append(xx09, []string{szPort, service})
8585
}
8686
if os.Getenv("NoPOC") != "true" {
87-
if "socks5" == service {
87+
if "socks5" == service || "vnc" == service {
8888
CheckWeakPassword(ip, service, port)
8989
} else if "445" == szPort && service == "microsoft-ds" || "135" == szPort && service == "msrpc" {
9090
util.PocCheck_pipe <- &util.PocCheck{

pkg/hydra/hydra.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var (
2222
CustomAuthMap *AuthList
2323
// rtsp://admin:[email protected]:554/0x8b6c42
2424
// rtsp: 554, 5554,8554
25-
ProtocolList = strings.Split("rdp,ssh,rsh-spx,mysql,mssql,oracle,postgresql,redis,ftp,mongodb,mongod,smb,telnet,snmp,wap-wsp,router,winrm,pop3,socks5", ",")
25+
ProtocolList = strings.Split("rdp,ssh,rsh-spx,mysql,mssql,oracle,postgresql,redis,ftp,mongodb,mongod,smb,telnet,snmp,wap-wsp,router,winrm,pop3,socks5,vnc", ",")
2626
)
2727

2828
func NewCracker(info *AuthInfo, isAuthUpdate bool, threads int) *Cracker {
@@ -82,6 +82,8 @@ func (c *Cracker) Run() {
8282
c.Pool.Function = postgresqlCracker
8383
case "socks5":
8484
c.Pool.Function = Socks5Cracker
85+
case "vnc":
86+
c.Pool.Function = VncCracker
8587
case "ldap", "rsh-spx", "ssh":
8688
c.Pool.Function = sshCracker
8789
case "telnet":

pkg/hydra/loadDicts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ func init() {
145145
}
146146
md["pop3"] = md["ssh"]
147147
md["socks5"] = md["ssh"]
148+
md["vnc"] = md["ssh"]
148149
md["rsh-spx"] = md["ssh"]
149150
md["snmp"] = &PPDict{
150151
Username: util.GetVal4File("snmp_user", snmp_user),

pkg/hydra/vnc/checkvnc.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package vnc
2+
3+
import (
4+
"fmt"
5+
"net"
6+
)
7+
8+
func Check(Host, Username, Password string, Port int) (bool, error) {
9+
nc, err := net.Dial("tcp", fmt.Sprintf("%s:%d", Host, Port))
10+
if err != nil {
11+
return false, err
12+
}
13+
cc1, err := Client(nc, &ClientConfig{Auth: []ClientAuth{&PasswordAuth{Password: Password}}})
14+
if err != nil {
15+
return false, err
16+
} else {
17+
cc1.Close()
18+
return true, nil
19+
}
20+
}

0 commit comments

Comments
 (0)