Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Plug-in: zem_contact_reborn

#241 2006-02-10 15:06:15

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: Plug-in: zem_contact_reborn

> thebombsite wrote:

@alannie – Thanks for the article pointer. I think I shall just go and emigrate now. :)

Pardon my Ugly-American-ness – I didn’t quite get what you meant. Was that some British humor? (I LOVE British humor – when I understand it! :)

Offline

#242 2006-02-10 16:07:10

-P-
Member
From: Finland
Registered: 2005-09-10
Posts: 211

Re: Plug-in: zem_contact_reborn

Okay.

Pardon my english too but this is quite serious shit. I just received email from my ISP telling that during past few days it´s been more than 20.000 spam emails that have been sent from my server using this contact form vulnerability.

Last edited by -P- (2006-02-10 16:07:44)

Offline

#243 2006-02-10 19:16:11

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Plug-in: zem_contact_reborn

Dang, from reading that securePHP article it really makes one think that the mail() function in PHP should really be re-conceived. The mail function in coldfusion for example is not nearly as free form.


Shoving is the answer – pusher robot

Offline

#244 2006-02-10 20:10:36

NeilA
Member
From: Blue Mountains, Australia
Registered: 2004-08-15
Posts: 316
Website

Re: Plug-in: zem_contact_reborn

P wrote: Okay. Pardon my english too but this is quite serious shit. I just received email from my ISP telling that during past few days it´s been more than 20.000 spam emails that have been sent from my server using this contact form vulnerability.

I’ve had a user on my hosting account suffer this too – but not with a TXP site. So is this the latest spammer crap to be foisted upon us? And to clarify, is the zem_contact_reborn form vulnerable?

You have me worried now…


Neil – Blue Mountains, Australia

http://westserve.org
http://ministrygrounds.net.au

Offline

#245 2006-02-10 20:25:26

-P-
Member
From: Finland
Registered: 2005-09-10
Posts: 211

Re: Plug-in: zem_contact_reborn

zem_contact_reborn form at least was vulnerable. Stuart has now been working on a fix. He and the other guys are more qualified persons to inform futher about it.

<blockquote>thebombsite wrote: I won’t put this in the main post but if you want to try this out here’s a link.</blockquote>

I suggest also that everybody will check with their ISP that is has appropiate/updated settings with their/your system form mail functions or what ever theyre called. Getting here way beyound my knowledge :D

Last edited by -P- (2006-02-10 20:27:39)

Offline

#246 2006-02-10 20:38:29

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

@alannie – Sorry. ;) What I meant was that now I have read that article I shall emigrate and accidently leave the plug-in behind. :)

Just to eleviate people’s anxiety I am just looking at some new Help text and hopefully Christmas will arrive early. Like tonight or the morning. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#247 2006-02-11 00:20:22

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

OK. Version .16 plus a new version of the “lang” plug-in plus a new plug-in. :)

Test it like crazy please!


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#248 2006-02-11 02:14:51

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 48

Re: Plug-in: zem_contact_reborn

> thebombsite wrote:

> I’m not sure what you mean by that neptho. Are you saying that this particular plug-in code is bad news or contact form code in general?

> As I’ve mentioned before we are looking at the “hidden empty field” method. Maybe a combination of both would be worth looking at?

Well, really, the problem is that the entirety of zem_contact is insecure. I’m looking right no0w at a means to easily rebuild the code, but the way it obtains and parses it’s variables are extremely easy to take advantage of. You plug one hole, you still have several more.

> P wrote:

> About what neptho wrote, expanding that thinking we could just give up in general and go back maintaining static html sites with no excutable code in it. :)

Sure.. then your site would be a bit more secure. It’s up to you – but to be as brash as I feel appropriate – Unless you know what it’s doing, don’t complain about my stand, because I claim what (moreover – how) it does things is bad.

Again, as I mentioned above, I’m looking at a means to clean the whole thing up – or create a workalike, but my time is nil, and honestly, I’ve just given up on every other “Open Source” project I have been maintaining or actively working on – getting into this is not something I relish. I might just turn the whole thing back over to Stuart, or anyone who wishes to manage it. I’ll update here as I decide what to do..

Offline

#249 2006-02-11 10:07:11

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

Well anything you have time to do to make it more secure would be welcome neptho. As I keep repeating, I’m no coder, though looking after this plug-in is helping me learn slowly. In the mean time would you like the template?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#250 2006-02-11 10:21:19

-P-
Member
From: Finland
Registered: 2005-09-10
Posts: 211

Re: Plug-in: zem_contact_reborn

@neptho What I just meant to say is please, don´t give up! It is really important and well valued work here what you´re all doing. Contact form, secure one is, really important part of dynamic websites.

I do have a slight idea, what this spam bot was/is able to do since there were 20.000 spam emails sent using my server and domain addresses.

edit: I found this earlier topic. So the form mail vulnerabily is actually old news that I was not aware of.

Last edited by -P- (2006-02-11 10:38:08)

Offline

#251 2006-02-11 11:38:51

neptho
Member
From: A cold, dark place.
Registered: 2006-02-01
Posts: 48

Re: Plug-in: zem_contact_reborn

> thebombsite wrote:

> Well anything you have time to do to make it more secure would be welcome neptho. As I keep repeating, I’m no coder, though looking after this plug-in is helping me learn slowly. In the mean time would you like the template?

Nah. I can just get the code by base64ing it. To make life easier on all of us, I’m just posting it in actual PHP form. I’ve given the whole thing a 15 minute onceover, and there are MANY things which are designed to be portable, but they’re almost intentionally too lax. Note that I’ve also changed my logic – to make it more legible, and less asinine. I was trying to follow the flow of the existing script, but I realized that, well, if it works, nobody should care.

I’ve killed redundancies, and changed many things into ternary operators. It looks different, and acts somewhat different. If some variables are not set, they will return FALSE rather than an empty value. If this breaks your system, let me know how you are calling it, and what it does, please.

You will have to disable zem_contact_reborn if you try this version.. I have renamed it so you can do your testing and easily turn zem_contact_reborn active and deactivate this if you have problems – however, if it works, I give Stuart full rights to integrate any/all code modifications.

Without further adieu, here it is (Textile, Imma gunna bust my foot off in your ass. Go away unless I ask for you!)

<pre>
YTo5OntzOjc6InZlcnNpb24iO3M6ODoiMDYuMDIuMTEiO3M6NjoiYXV0aG9yIjtzOjY6Im5l
cHRobyI7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GV4dCddKSkgPyAnc2VuZCBhcnRpY2xlJyA6ICRhdHRzWydsaW5rdGV4dCddOwoJCSRq
b2luID0gKGVtcHR5KCRfU0VSVkVSWydRVUVSWV9TVFJJTkcnXSkpID8gJz8nIDogJyZhbXA7
JzsKCQkkaHJlZiA9ICRfU0VSVkVSWydSRVFVRVNUX1VSSSddLiRqb2luLid6ZW1fY29udGFj
dF9zZW5kX2FydGljbGU9eWVzJzsKCQlyZXR1cm4gJzxhIGhyZWY9IicuJGhyZWYuJyI+Jy4k
bGlua3RleHQuJzwvYT4nOwoJfQoJcmV0dXJuOwoKfQoKZnVuY3Rpb24gemVtX2NvbnRhY3Rf
c3VibWl0KCRhdHRzKQp7CglnbG9iYWwgJHplbV9jb250YWN0X25vbmNlLCAkemVtX2NvbnRh
Y3RfZXJyb3I7CgoJZXh0cmFjdChsQXR0cyhhcnJheSgKCQknbGFiZWwnCQk9PiB6ZW1fY29u
dGFjdF9nVHh0KCdzZW5kJykKCSksICRhdHRzKSk7CgoJcmV0dXJuICc8aW5wdXQgdHlwZT0i
c3VibWl0IiBpZD0iemVtU3VibWl0IiBuYW1lPSJ6ZW1fY29udGFjdF9zdWJtaXQiIHZhbHVl
PSInLiRsYWJlbC4nIiAvPic7Cn0KIjtzOjM6Im1kNSI7czozMjoiZDM1MDJlMDJhMTBmZTIx
NTEwMWNiYTgxMDc0Njg1YjQiO30=</pre>

Last edited by neptho (2006-02-11 11:53:29)

Offline

#252 2006-02-11 11:48:53

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

Whoops! That didn’t come out too good did it? Thanks for having a look at it neptho but it might be better if you emailed the code to me and removed it from here. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

  1. Index
  2. » Archives
  3. » Plug-in: zem_contact_reborn

Board footer

Powered by FluxBB