veso266 / impacket

Automatically exported from code.google.com/p/impacket
Other
0 stars 0 forks source link

error: can only concatenate tuple (not "unicode") to tuple #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. command:
secretsdump.py -system c:\system -security c:\security -sam c:\sam LOCAL

2. output error:
[*] _SC_TlntSvr
[!] can only concatenate tuple (not "unicode") to tuple

3.

What is the expected output?
_SC_TlntSvr
0000   61 00 64 00 6D 00 69 00 6E 00 31 00 32 00 33 00    a.d.m.i.n.1.2.3.

PS: output from creddump-0.3\lsadump.py tool.

What version of the product are you using? On what operating system?
impacket-0.9.12
Python 2.7.8 (32 bits)
windows 2008 R2 (x64)

Original issue reported on code.google.com by myk...@gmail.com on 29 Aug 2014 at 5:17

GoogleCodeExporter commented 9 years ago
Hey Mate:

Thanks for the bug report.

Could you please edit secretsdump.py and uncomment the instances of:
                #import traceback
                #print traceback.print_exc()

run the script again and send me the output?

thanks!

Original comment by bet...@gmail.com on 29 Aug 2014 at 5:21

GoogleCodeExporter commented 9 years ago
Actually.. I'm attaching a modified version of secretsdump.py.. please use this 
one and let me know if it works.

cheers
beto

Original comment by bet...@gmail.com on 29 Aug 2014 at 5:30

Attachments:

GoogleCodeExporter commented 9 years ago
hello there.

output:

[*] _SC_TlntSvr
Traceback (most recent call last):
  File "C:\Python27\Scripts\secretsdump.py", line 1386, in dump
    self.__LSASecrets.dumpSecrets()
  File "C:\Python27\Scripts\secretsdump.py", line 1026, in dumpSecrets
    self.__printSecret(key, secret)
  File "C:\Python27\Scripts\secretsdump.py", line 946, in __printSecret
    secret += strDecoded
TypeError: can only concatenate tuple (not "unicode") to tuple
None
[!] can only concatenate tuple (not "unicode") to tuple
[*] Cleaning up...

PS: Since this is a lab environment I'm attaching the files (SAM, SECURITY and 
SYSTEM hives).
PS2: I forgot to mention the hive files are windows xp and the execution is 
taking place on W2k8 r2.

Thanks for the assistance. If you need any help let me know.

Original comment by myk...@gmail.com on 29 Aug 2014 at 5:38

Attachments:

GoogleCodeExporter commented 9 years ago
Hey mate..

thanks for the files!.. much appreciated.

Oka.. it's fixed at https://code.google.com/p/impacket/source/detail?r=1258

if you don't want to check out the file, just take a look at the diff.. just 
remove the trailing comma at the end of line 945.

BTW, when running secretsdump.py as LOCAL, you won't get the username for the 
vulnerable service. If you want to know the username run it remotely (it needs 
to connect to the target's Service Control Manager to get the username).

hope this helps!

thanks again for reporting this issue and please confirm it's working on your 
side so I close this one.

Original comment by bet...@gmail.com on 29 Aug 2014 at 5:49

GoogleCodeExporter commented 9 years ago
thanks doc!
very nice work indeed!

Original comment by myk...@gmail.com on 29 Aug 2014 at 5:54

GoogleCodeExporter commented 9 years ago
thanks!

happy hacking ;)

cheers,
beto

Original comment by bet...@gmail.com on 29 Aug 2014 at 5:57