argument changes, readme, etc

This commit is contained in:
delorean 2024-08-31 20:55:33 -05:00
parent ae0ecacec0
commit a50de85206
4 changed files with 33 additions and 29 deletions

View File

@ -1,23 +1,24 @@
# potknocker
> scans for ssh/ftp honeypots and loads arbitrary payloads onto them, like zip bombs
<p align="center"> <p align="center">
<img src="https://i.imgur.com/A6Y5Y7P.png" width="150" title="latina"> <img src="https://i.imgur.com/A6Y5Y7P.png" width="150" title="latina">
</p> </p>
<p align="center"> <p align="center">
"pinche sombreros blancos..." "pinche blancosombreros..."
</p> </p>
# potknocker
> scans for ssh/ftp honeypots and loads arbitrary payloads onto them, such as zip bombs
## usage ## usage
``` ```
! -r target specific cidr range [0.0.0.0/0] -r target specific cidr range [0.0.0.0/0]
-l list of target cidr's (individual ip = /32) -l list of target cidr's (individual ip = /32)
! -ssh target ssh honeypots -ssh target ssh honeypots
! -ftp target ftp honeypots -ftp target ftp honeypots
! -p payload file to upload -p payload file to upload
-c shell command to run after uploading ssh payload -c shell command to run after uploading ssh payload
-t threads [25] -t threads [25]
-s silence connection attempt logs -s silence connection attempt verbosity
``` ```

View File

@ -42,9 +42,11 @@ func LoadConf() {
fatal("are you targeting ssh (-ssh) or ftp (-ftp)?") fatal("are you targeting ssh (-ssh) or ftp (-ftp)?")
} }
if *payload != "" {
if _, err := os.Stat(*payload); err != nil { if _, err := os.Stat(*payload); err != nil {
fatal("payload '" + *payload + "' not found") fatal("payload '" + *payload + "' not found")
} }
}
targetcidr := "" targetcidr := ""
if *list == "" && *cidr == "" { if *list == "" && *cidr == "" {

View File

@ -37,21 +37,22 @@ func usage() {
Banner() Banner()
fmt.Fprintf(os.Stderr, ` fmt.Fprintf(os.Stderr, `
potknocker - the block party on honeypot street potknocker - the block party on honeypot street
%s!%s -r %starget specific cidr range [0.0.0.0/0]%s %s!%s -r %starget specific cidr range [0.0.0.0/0]
-l %slist of target cidr's (individual ip = /32)%s %s!%s -l %slist of target cidr's (individual ip = /32)%s
%s!%s -ssh %starget ssh honeypots%s -p %spayload file to upload to the pot%s
%s!%s -ftp %starget ftp honeypots -c %sshell commands to run on the pot
%s!%s -p %spayload file to upload%s %s!%s -ssh %starget ssh honeypots
-c %sshell command to run after uploading ssh payload%s %s!%s -ftp %starget ftp honeypots%s
-t %sthreads [25]%s -t %sthreads [25]%s
-s %ssilence attempt logs%s -s %ssilence attempt logs%s
`, colorRed, colorCyan, colorPurple, colorCyan, colorPurple, colorCyan, colorYellow, colorCyan, colorPurple, `, colorRed, colorCyan, colorPurple, colorRed, colorCyan, colorPurple, colorCyan, colorPurple, colorCyan,
colorCyan, colorYellow, colorCyan, colorPurple, colorRed, colorCyan, colorPurple, colorCyan, colorPurple, colorPurple, colorRed, colorCyan, colorPurple, colorRed, colorCyan, colorPurple, colorCyan, colorPurple,
colorCyan, colorPurple, colorCyan, colorPurple, colorReset) colorCyan, colorPurple, colorReset)
} }
func Banner() { func Banner() {
fmt.Fprintf(os.Stderr, ` fmt.Fprintf(os.Stderr, `
%s"i see a silly goose"%s
___________ ____ ___________ ____
______/ \__// \__/____\ ______/ \__// \__/____\
_/ \_/ //____\\ _/ \_/ //____\\
@ -67,8 +68,6 @@ func Banner() {
/____ / /____ /
/ \ / / \ /
\______\_________/ \______\_________/
%spotknocker - doing burnouts down honeypot street%s
sincerely, sincerely,
~delorean ~delorean
`, colorRed, colorReset) `, colorRed, colorReset)

View File

@ -13,14 +13,16 @@ func thread(addrs <-chan string, tab chan<- interface{}) {
} }
if c, err := connssh(addr); err == nil { if c, err := connssh(addr); err == nil {
success("connected to " + addr + " - " + string(c.ServerVersion())) success("connected to " + addr + " - " + string(c.ServerVersion()))
if Params.Payload != "" {
if err = loadpl(c); err == nil { if err = loadpl(c); err == nil {
success("wrote payload to " + c.RemoteAddr().String()) success("wrote payload to " + c.RemoteAddr().String())
}
}
if Params.Command != "" { if Params.Command != "" {
if err = runcmd(c, Params.Command); err == nil { if err = runcmd(c, Params.Command); err == nil {
success("executed command on " + c.LocalAddr().String() + " as " + c.User()) success("executed command on " + c.LocalAddr().String() + " as " + c.User())
} }
} }
}
c.Close() c.Close()
} }
} }