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 #11189, meterpreter > ls on 4gb files #11193

Merged
merged 2 commits into from Feb 7, 2019

Conversation

Projects
None yet
3 participants
@timwr
Copy link
Contributor

timwr commented Jan 3, 2019

This fixes #11189 by changing st_size to a 64bit (unsigned) integer

Verification

List the steps needed to make sure this thing works

  • Check out this change (but not the meterpreter fixes)
  • Get a python, java, mettle and windows meterpreter session
  • Verify meterpreter > ls still works as before (ensure there are no >2gb files where you ls)
  • Create a 4.1 gb file: dd if=/dev/zero of=lol4gb bs=4M count=1025
  • Some meterpreter sessions will fail to ls (python), some will overflow the 32bit number and show the wrong size.
  • Land and install the fixes to the meterpreters (rapid7/mettle#160 and https://github.com/rapid7/metasploit-payloads/pull/322/files), and re-stage the meterpreter sessions (to include the fixes)
  • Verify the correct file size is now shown

@timwr timwr changed the title fix #11189 fix #11189, meterpreter > ls on 4gb files Jan 3, 2019

@busterb busterb self-assigned this Feb 6, 2019

@busterb busterb merged commit c0dd020 into rapid7:master Feb 7, 2019

3 checks passed

Metasploit Automation - Sanity Test Execution Successfully completed all tests.
Details
Metasploit Automation - Test Execution Successfully completed all tests.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

busterb added a commit that referenced this pull request Feb 7, 2019

@busterb

This comment has been minimized.

Copy link
Contributor

busterb commented Feb 7, 2019

I made some improvements and increased inode to 64-bit as well as bumping everything that was 16-bit to 32-bit, which also allows 32-bit UID/GIDs, commonly seen with Active Directory integrations on Unix systems.

@busterb

This comment has been minimized.

Copy link
Contributor

busterb commented Feb 7, 2019

Release Notes

This extends Meterpreter to understand 64-bit file sizes, 32-bit UID/GID values, 64-bit time across more platforms, and more when enumerating files on a filesystem.

jmartin-r7 added a commit that referenced this pull request Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment