oiweiwei / go-msrpc Goto Github PK
View Code? Open in Web Editor NEWThe DCE/RPC / MS-RPC Codegen/Client for Go
License: MIT License
The DCE/RPC / MS-RPC Codegen/Client for Go
License: MIT License
I can't figure out how to access the StdRegProvider class to read values from the registry. It is necessary through WMI and not through the remote registry or WinRM. Are there any more examples?
Is it possible to use NTLM hash in this package? looks like it only supports plaintext passwords now.
I am trying to use it with goroutine in some cases, and I make a function like this
func WMIConn(info *common.HostInfo, user string, pass string, hash string, clientName string) (bool, error) {
ctx := gssapi.NewSecurityContext(context.Background())
if hash != "" {
gssapi.AddCredential(credential.NewFromNTHash(user, hash))
} else {
gssapi.AddCredential(credential.NewFromPassword(user, pass))
}
gssapi.AddMechanism(ssp.NTLM)
// ObjectExporter uses well-known endpoint 135.
cc, err := dcerpc.Dial(ctx, fmt.Sprintf("%v:%v", info.Host, info.Ports), dcerpc.WithTimeout(time.Duration(common.Timeout)*time.Second))
if err != nil {
return false, err
}
......
But I will get this error
panic: mechanism 1.3.6.1.4.1.311.2.2.10 already exist
goroutine 23 [running]:
wmi-brutreforce/Plugins/libs/go-msrpc/ssp/gssapi.(*MechanismStore).AddMechanism(0xc0003c1800, {0x1852290, 0x0})
/home/dev/test/Plugins/libs/go-msrpc/ssp/gssapi/mechanism_store.go:22 +0x2a7
wmi-brutreforce/Plugins/libs/go-msrpc/ssp/gssapi.AddMechanism(...)
/home/dev/test/Plugins/libs/go-msrpc/ssp/gssapi/mechanism_store.go:68
wmi-brutreforce/Plugins.WMIConn(0xc0013ae0c0, {0x7ffcf8076ebd, 0xd}, {0x1362248, 0xb}, {0x0, 0x0}, {0xc000b92db0?, 0x12?})
/home/dev/test/Plugins/wmi.go:219 +0x1cb
wmi-brutreforce/Plugins.WMI_PlainText_login.func1()
/home/dev/test/Plugins/wmi.go:119 +0xff
created by wmi-brutreforce/Plugins.WMI_PlainText_login
/home/dev/test/Plugins/wmi.go:116 +0x165
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.