Hi guys! (back after a while)

For the discussion of Perl, Python, Ruby, and PHP and other interpreted languages.

Hi guys! (back after a while)

Post by Fl0urite on Fri Mar 06, 2015 7:42 pm
([msg=87048]see Hi guys! (back after a while)[/msg])

So I haven't been on this forum for a LONG while, but I can guarantee you guys I have improved quite a bit.

I made an encrypted true P2P chat client that is near NSA proof.

I have it here on github: http://github.com/FreakControl/CryptoChat (forks are greatly appreciated.)

I will be releasing all sorts of new programs and maybe a few worms for you guys to play around with :geek:
Fl0urite
New User
New User
 
Posts: 11
Joined: Wed Feb 12, 2014 5:01 am
Blog: View Blog (0)


Re: Hi guys! (back after a while)

Post by WallShadow on Fri Mar 06, 2015 11:57 pm
([msg=87051]see Re: Hi guys! (back after a while)[/msg])

A full crypto chat client implementation!? In Python?! And only 150 lines?!?!
Someone knows how to get my attention :3

I'll be taking a look at this tomorrow, but right off the bat, i'll say that we are already far past having to "securly" share our keys. In short, it's not secure. A better idea would be using a key exchange protocol of some sort to share the key (look into diffie-hellman key exchange).
User avatar
WallShadow
Contributor
Contributor
 
Posts: 686
Joined: Tue Mar 06, 2012 9:37 pm
Blog: View Blog (0)


Re: Hi guys! (back after a while)

Post by limdis on Sat Mar 07, 2015 12:09 pm
([msg=87055]see Re: Hi guys! (back after a while)[/msg])

oh snap this is hot :geek:

Will also be reviewing this
"The quieter you become, the more you are able to hear..."
"Drink all the booze, hack all the things."
User avatar
limdis
Moderator
Moderator
 
Posts: 1657
Joined: Mon Jun 28, 2010 5:45 pm
Blog: View Blog (0)


Re: Hi guys! (back after a while)

Post by WallShadow on Sun Mar 08, 2015 3:37 pm
([msg=87077]see Re: Hi guys! (back after a while)[/msg])

Alright, damage report time.

No authentication at all, so when talking to someone, you have no idea whether you are talking to your true partner or the NSA.

Lack of authentication also opens you up to all manners of active attacks and the weaknesses of the CBC encryption scheme, such as malleability in the IV. In short, an active attacker can wait until you send your /leave message and then send any 1-16 byte data piece he wants. including a file upload. Note: this is doable with any know plaintext, just easier with a /leave message because it never changes.

No verification of the file download. You really need to trust your peer, because they can upload any file they want, and with a modified client, they can easily overwrite your "~/.bashrc" or something similar. Combined with the previous exploit, an attacker can null any file (or perhaps write a few bytes to it) he wants on your system as long as the path is fairly short.

No random key mode, only user supplied keys. No salt on it either. This means that i can capture just a bit of traffic from your conversation and run a trivial dictionary attack on your key and recover it.

The xor encryption serves essentially no purpose. AES-CBC is secure enough, you don't need any silly xor cipher that doesn't even add any protection to it.

The base64 encoding is useless, you're just adding more overhead everywhere. Seriously.

And lastly, to make this NSA proof, you shouldn't have to communicate a key to your partner. As I said before, use key exchange algos.

<3
User avatar
WallShadow
Contributor
Contributor
 
Posts: 686
Joined: Tue Mar 06, 2012 9:37 pm
Blog: View Blog (0)


Re: Hi guys! (back after a while)

Post by Fl0urite on Tue Mar 10, 2015 4:22 pm
([msg=87132]see Re: Hi guys! (back after a while)[/msg])

WallShadow wrote:Alright, damage report time.

No authentication at all, so when talking to someone, you have no idea whether you are talking to your true partner or the NSA.

Lack of authentication also opens you up to all manners of active attacks and the weaknesses of the CBC encryption scheme, such as malleability in the IV. In short, an active attacker can wait until you send your /leave message and then send any 1-16 byte data piece he wants. including a file upload. Note: this is doable with any know plaintext, just easier with a /leave message because it never changes.

No verification of the file download. You really need to trust your peer, because they can upload any file they want, and with a modified client, they can easily overwrite your "~/.bashrc" or something similar. Combined with the previous exploit, an attacker can null any file (or perhaps write a few bytes to it) he wants on your system as long as the path is fairly short.

No random key mode, only user supplied keys. No salt on it either. This means that i can capture just a bit of traffic from your conversation and run a trivial dictionary attack on your key and recover it.

The xor encryption serves essentially no purpose. AES-CBC is secure enough, you don't need any silly xor cipher that doesn't even add any protection to it.

The base64 encoding is useless, you're just adding more overhead everywhere. Seriously.

And lastly, to make this NSA proof, you shouldn't have to communicate a key to your partner. As I said before, use key exchange algos.

<3

Thank you so much for your feedback, any idea on how I could implement a key exchange algo? I was thinking SSL but SSL isn't even considered secure anymore. I was thinking of adding RC4 encryption as well.

I put it in base64 as a minor bit of obfuscation to the traffic, not for extra security.

I will update it to make it more secure, adding some filters for filenames.
Fl0urite
New User
New User
 
Posts: 11
Joined: Wed Feb 12, 2014 5:01 am
Blog: View Blog (0)


Re: Hi guys! (back after a while)

Post by WallShadow on Tue Mar 10, 2015 10:24 pm
([msg=87143]see Re: Hi guys! (back after a while)[/msg])

look into diffie-hellman key exchange.
User avatar
WallShadow
Contributor
Contributor
 
Posts: 686
Joined: Tue Mar 06, 2012 9:37 pm
Blog: View Blog (0)



Return to Interpreted Languages

Who is online

Users browsing this forum: No registered users and 0 guests