Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)
Author Message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

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

On the other ones, what is the domain name?
 
View user's profile Send private message
BobMarion
Former Admin in Good Standing



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

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

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

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

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

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.

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
sixonetonoffun







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

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.
 
BillytheCrayon
New Member
New Member



Joined: Jun 19, 2004
Posts: 3

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

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

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







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

forget the part about my local IP Bang Head

Why do I activate sentinel on the testserver at all? Wink
 
MrFluffy







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

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â„¢
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)...
 
Raven







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

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);
  }
 
Raven







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

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);
  }
 
MrFluffy







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

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
 
Raven







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

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
 
BobMarion







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

Added to Sentinel(tm) 2.0.0 Smile
 
MrFluffy







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

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©