Didier Stevens

Tuesday 6 June 2017

Update: xor-kpa.py Version 0.0.5

Filed under: Encryption,My Software,Update — Didier Stevens @ 0:00

Some small changes to my XOR known plaintext attack tool (xor-kpa), which will be detailed in an ISC Diary entry.

xor-kpa_V0_0_5.zip (https)
MD5: 023D8E3725E0EF7CEC449085AA96BB3A
SHA256: 7517DD44AFBFA11122FD940D76878482F50B7A2A2BCD1D7A2AF030F6CAC4F4E3


  1. […] Tools: xor-kpa.py […]

    Pingback by xor-kpa.py Version 0.0.5 – Didier Stevens Videos — Thursday 8 June 2017 @ 18:30

  2. […] SANS Internet Storm Centre this week regarding decoding XOR-encoded payloads. As a result, he also updated his xor-kpa Python script to version 0.0.5 and released a video of it in […]

    Pingback by Week 23 – 2017 – This Week In 4n6 — Sunday 11 June 2017 @ 2:43

  3. […] Update: xor-kpa.py Version 0.0.5 […]

    Pingback by Overview of Content Published In June | Didier Stevens — Saturday 1 July 2017 @ 15:02

  4. hello, when I want use your file with XOR function, my cmd shell return error, how i do fix it ?

    xor-kpa.py -x #h#152A2A32622A32622261312622302635622E2431302025266D62272E622D2E3663322A22332762 #ABC
    Traceback (most recent call last):
    File “C:\Users\SiMS.DESKTOP-SCJIOK0\Documents\xor-kpa_V0_0_5\xor-kpa.py”, line 413, in
    File “C:\Users\SiMS.DESKTOP-SCJIOK0\Documents\xor-kpa_V0_0_5\xor-kpa.py”, line 410, in Main
    XOR(args[0], args[1], options)
    File “C:\Users\SiMS.DESKTOP-SCJIOK0\Documents\xor-kpa_V0_0_5\xor-kpa.py”, line 327, in XOR
    StdoutWriteChunked(XORData(plaintext, ciphertext))
    File “C:\Users\SiMS.DESKTOP-SCJIOK0\Documents\xor-kpa_V0_0_5\xor-kpa.py”, line 271, in XORData
    return ”.join([chr(ord(data[i]) ^ ord(key[i % len(key)])) for i in range(len(data))])
    File “C:\Users\SiMS.DESKTOP-SCJIOK0\Documents\xor-kpa_V0_0_5\xor-kpa.py”, line 271, in
    return ”.join([chr(ord(data[i]) ^ ord(key[i % len(key)])) for i in range(len(data))])
    TypeError: ord() expected string of length 1, but int found

    Comment by Louis — Sunday 7 March 2021 @ 11:10

  5. It’s not yet updated to Python 3 . Use Python 2.

    Comment by Didier Stevens — Sunday 7 March 2021 @ 11:12

RSS feed for comments on this post. TrackBack URI

Leave a Reply (comments are moderated)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.