Git Product home page Git Product logo

Comments (15)

byt3bl33d3r avatar byt3bl33d3r commented on July 20, 2024

@maycon Hi, This is a bug in the impacket library will pass this along to the dev. Thanks

from crackmapexec.

byt3bl33d3r avatar byt3bl33d3r commented on July 20, 2024

Pinging @asolino, looks like a unicode bug in secretsdump.py here https://github.com/CoreSecurity/impacket/blob/master/examples/secretsdump.py#L1967.

from crackmapexec.

asolino avatar asolino commented on July 20, 2024

@byt3bl33d3r
Hmm.. I can't spot it.. can you?
Btw, there are two getBootKey methods. One is RemoteOperations.getBootKey() and the other one DumpSecrets.getBootKey(). This last one is used if you're reading the registry hives locally (as explained here).

I think you pointed out the wrong one.

from crackmapexec.

byt3bl33d3r avatar byt3bl33d3r commented on July 20, 2024

@asolino oops , yeah meant to point to RemoteOperations.getBootKey()

from crackmapexec.

asolino avatar asolino commented on July 20, 2024

I can't get to spot an encoding error there.. do you?

@maycon can you tell us:

  1. Operating System (version and language) you're launching crackmapexec.py from?
  2. Operating System (version and language) of the target system?
  3. Is both impacket and crackmapexec running latest version?

from crackmapexec.

byt3bl33d3r avatar byt3bl33d3r commented on July 20, 2024

the exact line where the exception occurs is here https://github.com/CoreSecurity/impacket/blob/master/examples/secretsdump.py#L606

from crackmapexec.

asolino avatar asolino commented on July 20, 2024

@byt3bl33d3r yeah I saw that. But still don't understand why that would trigger an encoding error. Can you reproduce this issue?

@maycon any chance you add a

print repr(bootKey) 

before this for loop in crackmapexec.py at line 932?

and send us the output.

from crackmapexec.

byt3bl33d3r avatar byt3bl33d3r commented on July 20, 2024

@asolino holdon, think this might be my fault, will push a fix in a sec to see if it helps

from crackmapexec.

asolino avatar asolino commented on July 20, 2024

@byt3bl33d3r what do you think is it?

from crackmapexec.

byt3bl33d3r avatar byt3bl33d3r commented on July 20, 2024

@maycon Do a git pull and see if that helps.

@asolino just guessing, but I added

from __future__ import unicode_literals

so all strings are now unicode by default in CrackMapExec, there are a lot of variables initialized with an empty string like bootKey = '' which are now unicode strings so when it hits line 933 it might be having issues when appending to the string e.g.self.__bootKey += bootKey[transforms[i]]

from crackmapexec.

asolino avatar asolino commented on July 20, 2024

@byt3bl33d3r ohhh.. that is quite a change mate!. That could be it indeed.

from crackmapexec.

byt3bl33d3r avatar byt3bl33d3r commented on July 20, 2024

yeah looking back it wasn't a smart idea, was just fed up with dealing with unicode issues.

from crackmapexec.

asolino avatar asolino commented on July 20, 2024

@byt3bl33d3r I feel your pain.. Unicode ain't easy.

from crackmapexec.

maaaaz avatar maaaaz commented on July 20, 2024

@byt3bl33d3r, unicode pains will never end :(

from crackmapexec.

byt3bl33d3r avatar byt3bl33d3r commented on July 20, 2024

@maycon the new version should resolve at least some issues related to unicode

from crackmapexec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.