vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   PM Encryption - Encrypt all your PMS! (https://vborg.vbsupport.ru/showthread.php?t=79484)

Deaths 04-05-2005 09:00 PM

PM Encryption - Encrypt all your PMS!
 
PM Encryption v 1.0.0


As requested by Sully02, here: https://vborg.vbsupport.ru/showthrea...780#post636780
This nifty little hack encrypts your user's (and your), PMs when sent, and unencrypts them when they are read :)!
It also supports the downloading of the PMS, all PMs downloaded will be unencrypted.

Creator: Deaths
Live Demo: Theres nothing to see.
Screenshots: Nothing to see.
Support is in this thread, and preferably at vBadditions.com

I have included an Installer, which will encrypt all previously sent PMs!

Tested on 3.0.7, should work with all 3.0.x's.

Stats:
Files to Edits: 1
New Files: 0
Templates to edit: 0
Templates to add: 0
Dont underestimate this hack though, its not a mini-mod ;).

Follow the instructions in the install file, and everything should go just fine :).

Todo list:
  • Your suggestions.

Zachery 04-06-2005 04:12 PM

There is no hack attached.

Deaths 04-06-2005 04:13 PM

Lol, you're very fast ^^.

I still needed to get the threadid, for the "Click Install" link in the file ;)

j_86 04-06-2005 04:44 PM

Hi - what is the use in this hack? I can only think.. to stop admins using the "Read Your Users PMs" hack, or people with access to the database reading people PMs.

But it uses Base64. This is not encryption. It is encoding - ANYONE can decrypt base64 things - base64_decode(message) in php, $base64(message.txt) in mIRC.

Deaths 04-06-2005 05:02 PM

This was requested by a member, so I created it.

And if you dont know this is base64, you can't decode it ;)

Bolas 04-06-2005 05:05 PM

maybe... just prevent lamers admin to read pms ;)

Nice idea this hack, you can increase protection using your algo to crypt and to decrypt messages (instead using base64).

like
Code:

function cryptalgo($message) {
 // blah blah
 return $cryptedmessage
}

and..
Code:

function decryptalgo($cryptedmessage) {
  // halb halb
  return $message
 }

etc..

Zachery 04-06-2005 05:22 PM

I was thinki9ng about this myself, It would be better off to use mycrypt providing it is installed with your php.

Deaths 04-06-2005 05:23 PM

Hmm, good idea.

I'll look into that, together with some other suggestions.

Marco van Herwaarden 04-06-2005 05:29 PM

Quote:

Originally Posted by JimpsEd
Hi - what is the use in this hack? I can only think.. to stop admins using the "Read Your Users PMs" hack, or people with access to the database reading people PMs.

But it uses Base64. This is not encryption. It is encoding - ANYONE can decrypt base64 things - base64_decode(message) in php, $base64(message.txt) in mIRC.

Correct, using a base64_encode is NOT encrypting message. It is just used to create a binairy safe representation of a string.

Anybody can decode it. This will not protect private message from being read. The only way you could protect private messages would be to first exchange a private key, then use that to encrypt your PM's with someone.

Zachery 04-06-2005 05:31 PM

http://us3.php.net/manual/en/ref.mcrypt.php :)

Trigunflame 04-06-2005 05:36 PM

Zach, it does not matter which type you use. Whatever is used to has to translate the message back into plaintext, thus there is no point to this hack whatsoever.

Zachery 04-06-2005 05:41 PM

Quote:

Originally Posted by Trigunflame
Zach, it does not matter which type you use. Whatever is used to has to translate the message back into plaintext, thus there is no point to this hack whatsoever.

You could store the key and the encryption type in the database or in a file somewhere. Or even make it an extra option for two users to create their own keys to be shared with eachother.

Its more than possible to encrypt them so an external source who may gain access to your database will not be able to read their contents.

Deaths 04-06-2005 05:43 PM

How is a user going to tell which encryption (or whatever you want to call it) you're using?

Ofcourse, anyone can translate it back, else this hack wouldn't even be possible.

Zachery 04-06-2005 05:44 PM

Quote:

Originally Posted by Deaths
How is a user going to tell which encryption (or whatever you want to call it) you're using?

Ofcourse, anyone can translate it back, else this hack wouldn't even be possible.

I didn't say it was easy, just possible.

Deaths 04-06-2005 05:45 PM

@Zach thats a very nice guide, but users would need to install it first, wouldn't they?

EDIT I'm too slow today :/

Deaths 04-06-2005 05:47 PM

I was replying to Trigunflame's post, but you just reply too fast :)

Trigunflame 04-06-2005 05:47 PM

Quote:

Originally Posted by Zachery
You could store the key and the encryption type in the database or in a file somewhere. Or even make it an extra option for two users to create their own keys to be shared with eachother.

Its more than possible to encrypt them so an external source who may gain access to your database will not be able to read their contents.

That's my point. If a person got access to the db, what is to prevent them from using the key itself.

All they would have to do is try different variations of encryptions, and arragements of the keys in relation to the data encrypted.

Whats worse, if they were a member at vbulletin.org, they will Know the arrangement of the keys, just by viewing this hack.

Zachery 04-06-2005 05:48 PM

Quote:

Originally Posted by Trigunflame
That's my point. If a person got access to the db, what is to prevent them from using the key itself.

Like I said, It does not need to be stored in the database. I would assume if someone needs something like that encrypted they will give the second user the key so they can decrypt it.

Deaths 04-06-2005 05:49 PM

But would the user installing this hack also need to install Mcrypt, or did I just read that wrong?

Trigunflame 04-06-2005 05:51 PM

Quote:

Originally Posted by Deaths
But would the user installing this hack also need to install Mcrypt, or did I just read that wrong?

Mcrypt is compiled in most installations on *Nix.

And yes they would need it... however, there is no point to it. If you did use a key encryption, I would do it somewhat like;

encryption(plaintext password . PMData . passwordHashinVbulletin)

there has to be some form of user input, or they would be no point; as zach mentioned.

Deaths 04-06-2005 05:56 PM

Hmm, I see.

Well, there is no real way of "encripting" something, and hiding it from the public, but still making it readable after that.
At least not in PHP.

Or am I wrong?

Bolas 04-06-2005 06:07 PM

and use a JavaScript (client side) on the fly decryption?
I think something like a public and private password: RSA?

public password is stored in database, so anyone can crypt the message using adressee public pass.

When the message is ready to be decrypted and the user open it, a javascript prompt ask him the private password.
Then a function will decrypt client side the crypted message.

BamaStangGuy 04-06-2005 07:23 PM

Quote:

maybe... just prevent lamers admin to read pms
That made a whole lot of sense right there... seeing how the admin would have to install this in the first place to prevent himself, the lame admin, from reading pms... uh huh

j_86 04-06-2005 07:52 PM

Store the key in config.php and make it global.

sully02 04-06-2005 08:46 PM

One thing I found after testing this out...

The encryption works for storing it in the database, but when you reply to a private message, the text in the quote box is the encrypted message.

Edit - Removed quote so as not to confuse posters... I'm so used to the quote not showing up by default on my board.

Another thing I notice... When it quotes a previous PM in a reply, it has trouble parsing the apostorphes... They show up, but they are preceded by several slashes. I assume that's a side effect of the encoding.

Deaths 04-07-2005 06:21 AM

Yes, the quoting is a pain in the ass.

If you'd want that to go away, there would be a number of additional edits in functions_newpost.php, and functions_bbcodeparse.php :/

tehste 04-07-2005 06:57 AM

I think PM encryption is one of the things that jellsoft may have thought about and decided it is pointless. If someone has access to your database they could do far worse than read private messages. Unless obviously it is the Administrator, But he/she could easily read the 'encrypted' message if they so desired.

If a user recieves a private/personal message they could always download it and delete the message. (Is the row in the database removed when the recipient and sender delete the message?).

Privacy depends on what your forum is about. For example if your userbase was largely under 13 years old and there were a few 40-50 year old males on your board then it may be prudent to actually check or screen messages. Obviously that is a stereotypical example and I am not saying that all 40-50 males are seedy... Rather it would be odd if they were on a board dominated by younger people.

Anyway it is a good idea though not really that useful...

Bolas 04-07-2005 08:57 AM

Quote:

Originally Posted by zsdave
Privacy depends on what your forum is about. For example if your userbase was largely under 13 years old and there were a few 40-50 year old males on your board then it may be prudent to actually check or screen messages. Obviously that is a stereotypical example and I am not saying that all 40-50 males are seedy... Rather it would be odd if they were on a board dominated by younger people.

your're right, of course.. and..

Quote:

Originally Posted by zsdave
Privacy depends on what your forum is about.

But this is a coder forum and we like to talk about algos, vb coding technics and beer! :D
(not enought women around here... http://www.wellage.net/images/smilies/ehm.gif)

Deaths 04-07-2005 09:03 AM

Haha, that last comment really made me laugh :D

Cyricx 04-07-2005 07:58 PM

I'm kinda lost on the point of this...

Is it to stop admins from reading pms?

Couldn't they just login as you? there's enough hacks to do that already..

Bolas 04-07-2005 09:19 PM

It's different..

An admin with informatic skills and with an innocent mind would like to protect users against another bad admin..

A solution for that is to don't store the key to decrypt..

Deaths 04-08-2005 05:42 AM

The hack encodes the PM's, and decodes them when received.

It has no real logic, but it was requested by a member, so I created it.

I believe he gave an explenation why he found it usefull, check the thread out. (link in first poist).

moonclamp 04-20-2006 03:14 PM

Is there any chance of a port of this to 3.5.x please?

I need to stop the designers/hosts/admins ability to access them in the database. :)

Zachery 04-20-2006 05:30 PM

Quote:

Originally Posted by moonclamp
Is there any chance of a port of this to 3.5.x please?

I need to stop the designers/hosts/admins ability to access them in the database. :)

This doesn't actually work like it needs to, its not feature complete nor secure.

moonclamp 04-23-2006 06:53 PM

Really? ah well, that's a shame.

Borgs8472 04-23-2006 07:58 PM

I would say this hack is fairly secure until someone discovers this thread, like with many vb hacks ;)


All times are GMT. The time now is 03:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01780 seconds
  • Memory Usage 1,810KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (36)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete