mirror of
https://github.com/BishopFox/sliver.git
synced 2026-11-10 01:41:29 -10:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
739ad98b81 | ||
|
|
95c1697d1b | ||
|
|
f7b9571cfc | ||
|
|
0d08f8c62f | ||
|
|
aa9c8d89e9 | ||
|
|
396dc9724f | ||
|
|
c0f3161525 |
No files matched your search
@@ -21,7 +21,7 @@ jobs:
|
||||
linux-windows-build-test:
|
||||
name: Linux & Windows Test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- name: Go 1.25
|
||||
uses: actions/setup-go@v5
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
macos-build-test:
|
||||
name: MacOS Test
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 90
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- name: Go 1.25
|
||||
uses: actions/setup-go@v5
|
||||
|
||||
@@ -24,7 +24,6 @@ import (
|
||||
// {{end}}
|
||||
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -109,7 +108,7 @@ func nsLinuxIfconfig(interfaces *sliverpb.Ifconfig) {
|
||||
namespacesFound := make(map[uint64]string)
|
||||
|
||||
procDir := "/proc"
|
||||
procContents, err := ioutil.ReadDir(procDir)
|
||||
procContents, err := os.ReadDir(procDir)
|
||||
|
||||
if err != nil {
|
||||
//{{if .Config.Debug}}
|
||||
|
||||
@@ -47,3 +47,5 @@ package syscalls
|
||||
|
||||
//sys Module32FirstW(hSnapshot windows.Handle, lpme *MODULEENTRY32W) (err error) = kernel32.Module32FirstW
|
||||
//sys RegSaveKeyW(hKey windows.Handle, lpFile *uint16, lpSecurityAttributes *windows.SecurityAttributes) (err error) = advapi32.RegSaveKeyW
|
||||
|
||||
//sys NtCreateThreadEx(threadHandle *windows.Handle, desiredAccess uint32, objectAttributes uintptr, processHandle windows.Handle, startAddress uintptr, parameter uintptr, createSuspended bool, stackZeroBits uint32, sizeOfStackCommit uintptr, sizeOfStackReserve uintptr, lpBytesBuffer uintptr) (status uint32) = ntdll.NtCreateThreadEx
|
||||
@@ -21,7 +21,6 @@ package taskrunner
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@@ -67,7 +66,7 @@ func Sideload(procName string, procArgs []string, _ uint32, data []byte, args []
|
||||
cmd *exec.Cmd
|
||||
)
|
||||
fdPath := fmt.Sprintf("/tmp/.%s", RandomString(10))
|
||||
err := ioutil.WriteFile(fdPath, data, 0755)
|
||||
err := os.WriteFile(fdPath, data, 0755)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
|
||||
// "gitlab.com/mjwhitta/win/winhttp/http"
|
||||
"gitlab.com/mjwhitta/win/wininet/http"
|
||||
@@ -80,7 +80,7 @@ func main() {
|
||||
}
|
||||
|
||||
if res.Body != nil {
|
||||
if b, e = ioutil.ReadAll(res.Body); e != nil {
|
||||
if b, e = io.ReadAll(res.Body); e != nil {
|
||||
panic(e)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package wininet
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"sync"
|
||||
@@ -62,7 +62,7 @@ func (c *Client) Do(request *http.Request) (*http.Response, error) {
|
||||
|
||||
var rawBody []byte
|
||||
if request.Body != nil {
|
||||
rawBody, err = ioutil.ReadAll(request.Body)
|
||||
rawBody, err = io.ReadAll(request.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read request body: %w", err)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -304,7 +303,7 @@ func readResponse(reqHndl uintptr) (io.ReadCloser, int64, error) {
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
return ioutil.NopCloser(bytes.NewReader(b)), contentLen, nil
|
||||
return io.NopCloser(bytes.NewReader(b)), contentLen, nil
|
||||
}
|
||||
|
||||
func sendRequest(reqHndl uintptr, r *Request) error {
|
||||
|
||||
+4
-5
@@ -23,7 +23,6 @@ import (
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@@ -108,13 +107,13 @@ func GetCertificateAuthorityPEM(caType string) ([]byte, []byte, error) {
|
||||
caCertPath := filepath.Join(getCertDir(), fmt.Sprintf("%s-ca-cert.pem", caType))
|
||||
caKeyPath := filepath.Join(getCertDir(), fmt.Sprintf("%s-ca-key.pem", caType))
|
||||
|
||||
certPEM, err := ioutil.ReadFile(caCertPath)
|
||||
certPEM, err := os.ReadFile(caCertPath)
|
||||
if err != nil {
|
||||
certsLog.Error(err)
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
keyPEM, err := ioutil.ReadFile(caKeyPath)
|
||||
keyPEM, err := os.ReadFile(caKeyPath)
|
||||
if err != nil {
|
||||
certsLog.Error(err)
|
||||
return nil, nil, err
|
||||
@@ -137,12 +136,12 @@ func SaveCertificateAuthority(caType string, cert []byte, key []byte) {
|
||||
certFilePath := filepath.Join(storageDir, fmt.Sprintf("%s-ca-cert.pem", caType))
|
||||
keyFilePath := filepath.Join(storageDir, fmt.Sprintf("%s-ca-key.pem", caType))
|
||||
|
||||
err := ioutil.WriteFile(certFilePath, cert, 0600)
|
||||
err := os.WriteFile(certFilePath, cert, 0600)
|
||||
if err != nil {
|
||||
certsLog.Fatalf("Failed write certificate data to: %s", certFilePath)
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(keyFilePath, key, 0600)
|
||||
err = os.WriteFile(keyFilePath, key, 0600)
|
||||
if err != nil {
|
||||
certsLog.Fatalf("Failed write certificate data to: %s", keyFilePath)
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ func getOrdinal(index uint32, rawData []byte, fpe *pe.File, funcArrayFoa uint32)
|
||||
}
|
||||
|
||||
// func getExportOffsetFromFile(filepath string, exportName string) (funcOffset uint32, err error) {
|
||||
// rawData, err := ioutil.ReadFile(filepath)
|
||||
// rawData, err := os.ReadFile(filepath)
|
||||
// if err != nil {
|
||||
// return 0, err
|
||||
// }
|
||||
|
||||
Reference in new issue
Block a user