Compare commits

...
5 Commits
Author SHA1 Message Date
moloch-- 1420ebd447 Moved asset setup to client/console 2021-08-03 19:51:37 -07:00
rkervella 96a531f9d4 Merge branch 'master' into extensions 2021-08-03 12:33:55 +02:00
Ronan Kervella 7ef4923fc0 Merge pull request #490 from iiiusky/fix/portfwdBug
fix: Remove default from select, which will cause the cpu to spike
Overriding commit signing for this one, it's a one line change with no security impact.
2021-08-03 11:50:18 +02:00
sky 3f83761a90 fix: Remove default from select, which will cause the cpu to spike 2021-08-03 16:11:36 +08:00
Ronan Kervella f3bdb5cadc Merge pull request #486 from BishopFox/hosts
Hosts
2021-08-02 09:04:31 +02:00
6 changed files with 15 additions and 14 deletions

No files matched your search

+2 -2
View File
@@ -109,7 +109,7 @@ func setupCoffLoaderExt(appDir string) error {
win64ExtDir := path.Join("windows", "amd64")
coffLoader32 := path.Join("fs", SliverExtensionsDirName, win32ExtDir, "COFFLoader.x86.dll")
coffLoader64 := path.Join("fs", SliverExtensionsDirName, win64ExtDir, "COFFLoader.x64.dll")
manfiestPath := path.Join("fs", SliverExtensionsDirName, "manifest.json")
manifestPath := path.Join("fs", SliverExtensionsDirName, "manifest.json")
loader64, err := assetsFs.ReadFile(coffLoader64)
if err != nil {
return err
@@ -118,7 +118,7 @@ func setupCoffLoaderExt(appDir string) error {
if err != nil {
return err
}
manifest, err := assetsFs.ReadFile(manfiestPath)
manifest, err := assetsFs.ReadFile(manifestPath)
if err != nil {
return err
}
+2 -3
View File
@@ -80,10 +80,9 @@ var rootCmd = &cobra.Command{
// StartClientConsole - Start the client console
func StartClientConsole() error {
assets.Setup(false, true)
configs := assets.GetConfigs()
if len(configs) == 0 {
fmt.Printf("No config files found at %s or -import\n", assets.GetConfigDir())
fmt.Printf("No config files found at %s (see --help)\n", assets.GetConfigDir())
return nil
}
config := selectConfig()
@@ -94,7 +93,7 @@ func StartClientConsole() error {
fmt.Printf("Connecting to %s:%d ...\n", config.LHost, config.LPort)
rpc, ln, err := transport.MTLSConnect(config)
if err != nil {
fmt.Printf("Connection to server failed %v", err)
fmt.Printf("Connection to server failed %s", err)
return nil
}
defer ln.Close()
+2
View File
@@ -95,6 +95,8 @@ type BindCmds func(console *SliverConsoleClient)
// Start - Console entrypoint
func Start(rpc rpcpb.SliverRPCClient, bindCmds BindCmds, extraCmds BindCmds, isServer bool) error {
assets.Setup(false, false)
con := &SliverConsoleClient{
App: grumble.New(&grumble.Config{
Name: "Sliver",
-2
View File
@@ -103,8 +103,6 @@ func (tun *Tunnel) Read(data []byte) (int, error) {
case data := <-tun.Recv:
log.Printf("Read %d bytes", len(data))
buff.Write(data)
default:
break
}
n := copy(data, buff.Bytes())
return n, nil
@@ -19,12 +19,13 @@ const (
)
type WindowsExtension struct {
id string
data []byte
module *memmod.Module
arch string
init string
onFinish func([]byte)
id string
data []byte
module *memmod.Module
arch string
init string
onFinish func([]byte)
serverStore bool
}
func NewWindowsExtension(data []byte, id string, arch string, init string) *WindowsExtension {
@@ -105,7 +106,7 @@ func (w *WindowsExtension) extensionCallback(data uintptr, dataLen uintptr) uint
b := (*byte)(unsafe.Pointer(uintptr(i) + data))
outBuff.WriteByte(*b)
}
//TODO: do somethig with outBuff
//TODO: do something with outBuff
if outBuff.Len() > 0 {
w.onFinish(outBuff.Bytes())
}
+1
View File
@@ -850,6 +850,7 @@ message CallExtensionReq {
string Name = 1;
string Export = 2;
bytes Args = 3;
bool ServerStore = 2;
commonpb.Request Request = 9;
}