PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Jun 15, 2004 3:13 pm Reply with quote Back to top

On the other ones, what is the domain name?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
BobMarion
Former Admin in Good Standing


Joined: Oct 30, 2002
Posts: 1043
Location: RedNeck Land (known as Kentucky)

PostPosted: Tue Jun 15, 2004 8:07 pm Reply with quote Back to top

sixonetonoffun wrote:
Building on what Raven did with cmd above NovemberRain try this its working ok for me but I only tested it briefly.
Around line 112 in includes/sentinel.php
change this line
if (eregi("http\:\/\/", $name) OR eregi("cmd",$querystring) OR eregi("exec",$querystring) OR eregi("concat",$querystring)) {
To this:
Code:

 if (eregi("http\:\/\/", $name) OR (eregi("cmd",$querystring) AND !eregi("&cmd",$querystring)) OR eregi("exec",$querystring) AND !eregi("execu",$querystring) OR eregi("concat",$querystring)) {
 


six, question?

Shouldn't the code
Code:
if (eregi("http\:\/\/", $name) OR (eregi("cmd",$querystring) AND !eregi("&cmd",$querystring)) OR eregi("exec",$querystring) AND !eregi("execu",$querystring) OR eregi("concat",$querystring)) {
be like
Code:
if (eregi("http\:\/\/", $name) OR (eregi("cmd",$querystring) AND !eregi("&cmd",$querystring)) OR (eregi("exec",$querystring) AND !eregi("execu",$querystring)) OR eregi("concat",$querystring)) {
with the extra pair of ( and ) to make the exec check inclusive and not interfere with the concat check? I'm not saying it is wrong but only wanting to make sure I'm understanding it correctly Smile
View user's profile Send private message Send e-mail Visit poster's website
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2499

PostPosted: Tue Jun 15, 2004 8:35 pm Reply with quote Back to top

I never tested anything but the user name with Executioner (Until just now) its doesn't seem to interfere but theres no reason not to add the extra braces for consistency at the very least.
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2499

PostPosted: Tue Jun 15, 2004 8:41 pm Reply with quote Back to top

In another thread we added AND !eregi("cmd=highlight",$querystring)) for compatability with Gallery it could probably be shortened but I left it more specific for the sake of resolving the problem for the user without adding any new wholes by mistake.
View user's profile Send private message
BillytheCrayon
New Member
New Member


Joined: Jun 19, 2004
Posts: 3

PostPosted: Fri Jun 25, 2004 9:06 am Reply with quote Back to top

NM, I found my problem Confused
View user's profile Send private message
MrFluffy
Hangin' Around


Joined: Jun 24, 2004
Posts: 28
Location: Berlin

PostPosted: Wed Jul 07, 2004 12:54 pm Reply with quote Back to top

I'm currently porting the phpBB nickpage mod to nuke and while testing I got caught several times for using the link:
Code:
modules.php?name=Forums&file=nickpage&user=aconrads&sid=xxx


I couldn't find the suspicious string in there. Can you spot it?
Is there a way to exclude 127.0.0.1 from sentinel at least for the remaining testing time?

Thanks!

MrFluffy
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
MrFluffy
Hangin' Around


Joined: Jun 24, 2004
Posts: 28
Location: Berlin

PostPosted: Wed Jul 07, 2004 12:59 pm Reply with quote Back to top

forget the part about my local IP Bang Head

Why do I activate sentinel on the testserver at all? Wink
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
MrFluffy
Hangin' Around


Joined: Jun 24, 2004
Posts: 28
Location: Berlin

PostPosted: Thu Jul 08, 2004 3:50 am Reply with quote Back to top

Quote:
Blocked IP: 127.0.0.1
User: aconrads
Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Abuse Blocked on: 2004-07-08 11:28:22
Notes: Added by Sentinel(tm)
Reason: Abuse - OTHER

Query String: localhost/webs/conrads/modules.php?name=Forums&file=nickpage&user=aconrads
Forwarded For: none
Client IP: none
Remote Address: 127.0.0.1
Remote Port: 1338
Request Method: GET


This is the complete administration entry (no email on my testserver)...
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Jul 08, 2004 5:10 am Reply with quote Back to top

This logic is for blocking a Forum attack. It looks like this may be another 'exception'. I will forward this over to the 'figue this out' department Laughing
Code:
  if (stristr($querystring,'&user=') AND ($name==Private_Messages || $name==Forums || $name==Members_List)) {
    block_ip($ip, $banuser, $bantime, $blocker_row);
  }
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Jul 08, 2004 5:21 am Reply with quote Back to top

As a quick work-around, try this
Code:
  if (stristr($querystring,'&user=') AND !stristr($querystring,'&file=nickpage') AND ($name==Private_Messages || $name==Forums || $name==Members_List)) {
    block_ip($ip, $banuser, $bantime, $blocker_row);
  }
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
MrFluffy
Hangin' Around


Joined: Jun 24, 2004
Posts: 28
Location: Berlin

PostPosted: Thu Jul 08, 2004 5:26 am Reply with quote Back to top

Raven wrote:
As a quick work-around, try this
Code:
  if (stristr($querystring,'&user=') AND !stristr($querystring,'&file=nickpage') AND ($name==Private_Messages || $name==Forums || $name==Members_List)) {
    block_ip($ip, $banuser, $bantime, $blocker_row);
  }


Thanks! I was just testing the same idea Wink, only with:
Code:
   if (!stristr($querystring,'nickpage&user=')) {
      if (stristr($querystring,'&user=') AND ($name==Private_Messages || $name==Forums || $name==Members_List) AND $name!=nickpage) {
         if($ab_config['act_filters'] > 1) {
            block_ip($ip, $banuser, $agent, $bantime, $reason, $ab_config['act_filters']);
         } else {
            write_mail($remote, $banuser, $bantime, $reason);
            Header("Location: index.php");
         }
      }
   }


Laughing

cu,
MrFluffy
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Jul 08, 2004 6:07 am Reply with quote Back to top

Same difference, although you could accomplish the same thing with just a tad bit more efficiency like this
Code:
  if (!stristr($querystring,'&file=nickpage') AND stristr($querystring,'&user=') AND ($name==Private_Messages || $name==Forums || $name==Members_List)) {
    block_ip($ip, $banuser, $bantime, $blocker_row);
  }
That avoides the {} processing and since it's the first logic check it will exit immediately. But, the gain would be so minimal it's not really necessary to change it. It's just for those 'SPEED' freaks out there Laughing
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
BobMarion
Former Admin in Good Standing


Joined: Oct 30, 2002
Posts: 1043
Location: RedNeck Land (known as Kentucky)

PostPosted: Thu Jul 08, 2004 9:20 am Reply with quote Back to top

Added to Sentinel(tm) 2.0.0 Smile
View user's profile Send private message Send e-mail Visit poster's website
MrFluffy
Hangin' Around


Joined: Jun 24, 2004
Posts: 28
Location: Berlin

PostPosted: Thu Jul 08, 2004 10:14 am Reply with quote Back to top

Thanks a lot!

But I didn't get the mod running completly yet, grrrr...
I'm a little lost in the paths Wink
About everything's running, apart from saving the base nickpage data and viewing the nickpage, which some nitpicking people could consider to be core functions Wink
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum