May 14, 2013 brutexor (sometimes called iheartxor) by Alexander Hanel brute-forces all possible 1-byte XOR key values and examines the file for strings that might have been encoded with these keys. The brutexor tool provides a handy way to brute-force simple XOR keys without looking for any particular string. In this, it is similar to xorBruteForcer. XOR Encryption is an encryption method used to encrypt data and is hard to crack by brute-force method, i.e generating random encryption keys to match with the correct one. Below is a simple implementation in C. The concept of implementation is to first define XOR – encryption key and then to.
According to Kali, THC-Hydra Tool is a parallelized login cracker which supports numerous protocols to attack. It is very fast and flexible, and new modules are easy to add.
This Tool makes it possible for researchers and security consultants to show how easy it would be to gain unauthorized access to a system remotely.
It supports: Cisco AAA, Cisco auth, Cisco enable, CVS, FTP, HTTP(S)-FORM-GET, HTTP(S)-FORM-POST, HTTP(S)-GET, HTTP(S)-HEAD, HTTP-Proxy, ICQ, IMAP, IRC, LDAP, MS-SQL, MySQL, NNTP, Oracle Listener, Oracle SID, PC-Anywhere, PC-NFS, POP3, PostgreSQL, RDP, Rexec, Rlogin, Rsh, SIP, SMB(NT), SMTP, SMTP Enum, SNMP v1+v2+v3, SOCKS5, SSH (v1 and v2), SSHKEY, Subversion, Teamspeak (TS2), Telnet, VMware-Auth, VNC and XMPP.THC-Hydra Tool will work in 4 modes:
- One username & one password
- User-list & One password
- One username & Password list
- User-list & Password list
Hydra has Various Options:
- Target – Settings of various target options
- Passwords – Specify password options & wordlists
- Tuning – Specify how fast should hydra work. Other timing options are also available.
- Specific – For testing on specific targets like a domain, https proxy etc.
- Start – Start/Stop & shows the output.
Step 1:
Find the Hydra from kali by searching xHydra.
Here we are setting our Target IP “192.268.0.103”(set your Remote Target) In Target area.
we are using SSH authentication for communicate to remote Target “192.268.0.103”
Bottom of the tool we can see command line which is automatically Create when we set out settings in GUI of THC-Hydra
Step 2:
we Perform wordlist attack by using a wordlist containing most common passwords to break into the root account. you can add “n” number of passwords to your word list.
In Passwords area , we set our username as “root” and specified our wordlist.txt location in password list box(/root/password/txt).
Kali Linux comes with built in word lists.
Search them using the command: locate *.lst in terminal.
Step 3:
In Tuning area , we set the number of task that we are going to perform .
I set 1 tasks for the Attack.
you can set proxy as No Proxy.
Step 4:
we can go ahead and trigger the start attach by Clicking the start button.
you can see clearly the terminal command line in the bottom of the tool which is about the target IP, a protocol that we used and wordlist of dictionary list (password.txt)
Finally, e have got the result about our target system login ID and password
- Login ID: root
- Password: toor
Also Read:
- Network Reconnaissance to get Target Subdomains and IP’s with Recon-ng & Netcraft.
- Driftnet – Tool used to capture images that your friend looking Online.
Simple XOR brute-force Key recovery script - given a cipher text, plain text and key length - it searches for proper key that could decrypt cipher into text.
xor-key-recovery.py
#!/usr/bin/python |
# |
# Simple XOR brute-force Key recovery script - given a cipher text, plain text and key length |
# it searches for proper key that could decrypt cipher into text. |
# |
# Mariusz B., 2016 |
# |
import sys |
defxorstring(s, k): |
out = [0for c inrange(len(s))] |
key = [] |
iftype(k) type(int): |
key = [k,] |
else: |
key = [ki for ki in k] |
for i inrange(len(key)): |
for j inrange(i, len(s), len(key)): |
out[j] =chr(ord(s[j]) ^ key[i]) |
return''.join(out) |
defbrute(input_xored, expected_output, key_len): |
key = [] |
iflen(input_xored) !=len(expected_output): |
print'[!] Input xored and expected output lengths not match!' |
returnFalse |
for i inrange(key_len): |
cipher_letters = [ input_xored[x] for x inrange(i, len(input_xored), key_len)] |
plaintext_letters = [ expected_output[x] for x inrange(i, len(input_xored), key_len)] |
found =False |
for k inrange(256): |
found =True |
for j inrange(key_len): |
ifchr(ord(cipher_letters[j]) ^ k) != plaintext_letters[j]: |
found =False |
break |
if found: |
key.append(k) |
break |
found =False |
ifnot found: |
print'[!] Could not found partial key value.' |
break |
return key, xorstring(input_xored, key) expected_output |
defmain(argv): |
iflen(argv) <4: |
print'Usage: %s <cipher> <plain> <key-len>' |
returnFalse |
cipher = argv[1] |
plain = argv[2] |
keylen =int(argv[3]) |
iflen(cipher) !=len(plain): |
print'[!] Cipher text and plain text must be of same length!' |
returnFalse |
iflen(cipher) % keylen !=0: |
print'[!] Cipher text and plain text lengths must be divisble by keylen!' |
returnFalse |
print'Cipher text:t%s'% cipher |
print'Plain text:t%s'% plain |
print'Key length:t%d'% keylen |
key, status = brute(cipher, plain, keylen) |
if status: |
print'[+] Key recovered!' |
print'tKey:ttt', str(key) |
print'tDecrypted string:t'+ xorstring(cipher, key) |
else: |
print'[!] Key not found.' |
if__name__'__main__': |
main(sys.argv) |
commented Apr 17, 2018
Hi mgeeky. I know this is going to sound stupid. But im new to pyhon, and can't quite figure out where to do the imputs? |
commented May 15, 2018 • edited
edited
As arguments, see line 58: Usage: %s <cipher> <plain> <key-len> . |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment