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

Problem with getst.py spn in Chinese #1595

Closed
helloyw opened this issue Aug 12, 2023 · 3 comments
Closed

Problem with getst.py spn in Chinese #1595

helloyw opened this issue Aug 12, 2023 · 3 comments
Assignees
Labels
medium Medium priority item

Comments

@helloyw
Copy link

helloyw commented Aug 12, 2023

Configuration

impacket version: v0.11.0
Python version: python3.10.5
Target OS: windows

Debug Output With Command String

i.e.
python3 getst.py -dc-ip 192.168.1.1 -spn host/'admin-中文.test.com' -imersonate Administrator test.com/test$:1qaz@WSX

Traceback (most recent call last):
  File "/home/kali/Desktop/impacket-0.11.0/examples/getST.py", line 655, in run
    tgs, cipher, oldSessionKey, sessionKey = self.doS4U(tgt, cipher, oldSessionKey, sessionKey, unhexlify(self.__nthash), self.__aesKey, self.__kdcHost)
  File "/home/kali/Desktop/impacket-0.11.0/examples/getST.py", line 422, in doS4U
    r = sendReceive(message, self.__domain, kdcHost)
  File "/usr/local/lib/python3.10/dist-packages/impacket-0.11.0-py3.10.egg/impacket/krb5/kerberosv5.py", line 91, in sendReceive
    raise krbError
impacket.krb5.kerberosv5.KerberosError: Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)
[-] Kerberos SessionError: KDC_ERR_C_PRINCIPAL_UNKNOWN(Client not found in Kerberos database)

PCAP

Additional context

Cannot find this computer when getst.py spn is in Chinese

@XiaoliChan
Copy link
Contributor

XiaoliChan commented Aug 16, 2023

I believe these Chinese characters may cause some Latin-1 encoding issues.

@alexisbalbachan alexisbalbachan self-assigned this Aug 17, 2023
@helloyw
Copy link
Author

helloyw commented Aug 17, 2023

我相信这些中国宪章会导致一些Latin-1编码问题。

师傅有办法解决吗?
Is there a solution?

@XiaoliChan
Copy link
Contributor

XiaoliChan commented Aug 17, 2023

Please add -debug to print the whole errors.

@anadrianmanrique anadrianmanrique added the medium Medium priority item label Aug 17, 2023
alexisbalbachan added a commit to alexisbalbachan/impacket that referenced this issue Oct 12, 2023
abbra pushed a commit to abbra/impacket that referenced this issue Nov 27, 2023
* Fixed unicode shares not being found

* Fixed unicode SPNs not being decoded appropriately

* Fixed spn not being found in getST, fixes fortra#1595

* Fixed unicode issues on login when using ntlmV1 fallback
Fixes fortra#1419
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Medium priority item
Projects
None yet
Development

No branches or pull requests

4 participants