Secure site ?

Page 1 of 2 12 LastLast
Results 1 to 25 of 31
  1. #1
    Valued Member Alkyron is offline
    MemberRank
    Jun 2007 Join Date
    100Posts

    Secure site ?

    Hello everyone, I'm looking for a way to secure my site (MPOG) because
    my site is hacked (LEVEL 99 ALL).


  2. #2
    Account Upgraded | Title Enabled! ~Fallen is offline
    MemberRank
    Dec 2008 Join Date
    Behind you look BehindLocation
    407Posts

    Re: Secure site ?

    anti-sql injection
    Last edited by ~Fallen; 08-05-09 at 12:03 PM.

  3. #3
    Valued Member Alkyron is offline
    MemberRank
    Jun 2007 Join Date
    100Posts

    Re: Secure site ?

    Could you give me one?

  4. #4
    Account Upgraded | Title Enabled! ~Fallen is offline
    MemberRank
    Dec 2008 Join Date
    Behind you look BehindLocation
    407Posts

    Re: Secure site ?

    go to release section Xzeeon made a topic of it.. but his way is not rly safe/

  5. #5
    Account Upgraded | Title Enabled! Trilest is offline
    MemberRank
    Apr 2009 Join Date
    The NetherlandsLocation
    549Posts

    Re: Secure site ?

    Quote Originally Posted by ~Fallen View Post
    go to release section Xzeeon made a topic of it.. but his way is not rly safe/
    Wizkidje released his one..

    Look in the release section he replied it somewhere

  6. #6
    Account Upgraded | Title Enabled! ~Fallen is offline
    MemberRank
    Dec 2008 Join Date
    Behind you look BehindLocation
    407Posts

    Re: Secure site ?

    its on the same topic

  7. #7
    Just Me iceman4154 is offline
    MemberRank
    Oct 2007 Join Date
    Columbus, OhioLocation
    217Posts

    Re: Secure site ?

    Code:
    function sanitize_data ( $sql ) {
      return preg_replace( "/[^a-zA-Z0-9 ]/i", "", $sql );
    }
    ~Iceman

  8. #8
    Sultan of Yolo Demantor is offline
    MemberRank
    May 2008 Join Date
    GermanyLocation
    1,266Posts

    Re: Secure site ?

    Don't use that web, neither FGunZs one.

  9. #9
    Valued Member Alkyron is offline
    MemberRank
    Jun 2007 Join Date
    100Posts

    Re: Secure site ?

    Ok , So add that?

  10. #10
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Secure site ?

    Quote Originally Posted by iceman4154 View Post
    Code:
    function sanitize_data ( $sql ) {
      return preg_replace( "/[^a-zA-Z0-9 ]/i", "", $sql );
    }
    ~Iceman
    That one clearly sucks. It blocks any slash, dot, comma, and so forth. Just clean ', " and \.

  11. #11
    Valued Member Alkyron is offline
    MemberRank
    Jun 2007 Join Date
    100Posts

    Re: Secure site ?

    What site taken. ? please

    MPOG = no
    FGUNZ = no
    And .. ...

  12. #12
    Account Upgraded | Title Enabled! Trilest is offline
    MemberRank
    Apr 2009 Join Date
    The NetherlandsLocation
    549Posts

    Re: Secure site ?

    Quote Originally Posted by Alkyron View Post
    What site taken. ? please

    MPOG = no
    FGUNZ = no
    And .. ...
    make ur own ;)

  13. #13
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: Secure site ?

    Quote Originally Posted by Wizkidje View Post
    That one clearly sucks. It blocks any slash, dot, comma, and so forth. Just clean ', " and \.
    No, it strips out anything but a-z, A-Z, and 0-9. And I find it laughable you're suggesting as I told you, despite still promoting your "safe" anti-SQL function.

    Quote Originally Posted by iceman4154 View Post
    Code:
    function sanitize_data ( $sql ) {
      return preg_replace( "/[^a-zA-Z0-9 ]/i", "", $sql );
    }
    ~Iceman
    Considering this is what I posted earlier, I'd say it's perfectly safe - as long as sanitize_data() is called for all data being accepted via $_GET and $_POST, and you should be clean thus far. e.g.:

    Code:
    $user = $_GET['user'];
    ..would be..

    Code:
    $user = sanitize_data ( $_GET['user'] );
    Don't forget to include the sanitize_data function in whatever script is calling it!

    Quote Originally Posted by ~Fallen View Post
    anti-sql injection
    "anti-sql injection" isn't the key to solving all possible security vulnerabilities - what about XSS? What if another vulnerability in the MServer daemon resulted in root (e.g.: Unchecked buffer - possibility for a buffer overflow).

    Not to mention, any other vulnerable service could be at fault.

    OP, there's too many possible areas that could be gone wrong - start by fixing the forementioned.

  14. #14
    Valued Member Alkyron is offline
    MemberRank
    Jun 2007 Join Date
    100Posts

    Re: Secure site ?

    I dont understand -_- , i need anti sql for my regpage and my upload emblem clan , please .

  15. #15
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: Secure site ?

    Quote Originally Posted by gWX0 View Post
    No, it strips out anything but a-z, A-Z, and 0-9. And I find it laughable you're suggesting as I told you, despite still promoting your "safe" anti-SQL function.



    Considering this is what I posted earlier, I'd say it's perfectly safe - as long as sanitize_data() is called for all data being accepted via $_GET and $_POST, and you should be clean thus far. e.g.:

    Code:
    $user = $_GET['user'];
    ..would be..

    Code:
    $user = sanitize_data ( $_GET['user'] );
    Don't forget to include the sanitize_data function in whatever script is calling it!



    "anti-sql injection" isn't the key to solving all possible security vulnerabilities - what about XSS? What if another vulnerability in the MServer daemon resulted in root (e.g.: Unchecked buffer - possibility for a buffer overflow).

    Not to mention, any other vulnerable service could be at fault.

    OP, there's too many possible areas that could be gone wrong - start by fixing the forementioned.
    Can't you test your site against SQL/XSS injections via the firefox extensions SQL Inject Me and XSS Me?
    I have to ask cause I'm not sure if they actually are able to detect if they are vulnerable since all of mine comes up as all green (green means its protected)

  16. #16
    Ragezone OG FrostElite is offline
    MemberRank
    Sep 2008 Join Date
    United StatesLocation
    1,880Posts

    Re: Secure site ?

    google is your friend

  17. #17
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: Secure site ?

    Quote Originally Posted by wesman2232 View Post
    Can't you test your site against SQL/XSS injections via the firefox extensions SQL Inject Me and XSS Me?
    I have to ask cause I'm not sure if they actually are able to detect if they are vulnerable since all of mine comes up as all green (green means its protected)
    I wouldn't rely on third-party browser plugins to validate all scripts for potential sanitization flaws. Rather, I would just ensure proper tags and other HTML entities are escaped, as are possible SQL character controls (Space, single/double quotes, and backslashes).

    Anyways, as I stated, as long as a-z, A-Z, and 0-9 characters are the only accepted form of data, virtually nothing can cause a problem. Now, granted, formatting characters may be needed, which is why you escape everything (As stated, HTML entities, and escape SQL char. controls).

    Quote Originally Posted by FrostElite View Post
    google is your friend
    Way to be completely void of help.

  18. #18
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Secure site ?

    Quote Originally Posted by gWX0 View Post
    No, it strips out anything but a-z, A-Z, and 0-9. And I find it laughable you're suggesting as I told you, despite still promoting your "safe" anti-SQL function.



    Considering this is what I posted earlier, I'd say it's perfectly safe - as long as sanitize_data() is called for all data being accepted via $_GET and $_POST, and you should be clean thus far. e.g.:

    Code:
    $user = $_GET['user'];
    ..would be..

    Code:
    $user = sanitize_data ( $_GET['user'] );
    Don't forget to include the sanitize_data function in whatever script is calling it!



    "anti-sql injection" isn't the key to solving all possible security vulnerabilities - what about XSS? What if another vulnerability in the MServer daemon resulted in root (e.g.: Unchecked buffer - possibility for a buffer overflow).

    Not to mention, any other vulnerable service could be at fault.

    OP, there's too many possible areas that could be gone wrong - start by fixing the forementioned.
    Lol, what you told me? I wrote an anti sql-injection function almost 2 year ago which does strip those 3 things. Including some functions to prevent XSS.

    Shush shush.

  19. #19
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: Secure site ?

    Quote Originally Posted by Wizkidje View Post
    Lol, what you told me? I wrote an anti sql-injection function almost 2 year ago which does strip those 3 things. Including some functions to prevent XSS.

    Shush shush.
    Your release stripped that and much more:

    http://forum.ragezone.com/f245/my-wa.../?#post4993113

    Code:
    function antisql($sql) {
        $sql = preg_replace(sql_regcase("(select|union|0x|cast|exec|varchar|insert into|delete from|update account|update login|update character|ugradeid|drop table|show tables)"),"",$sql);
        $sql = trim($sql);
        $sql = strip_tags($sql);
        $sql = addslashes($sql);
        return $sql;
    }
    Let's see - words such as "select" and "varchar" are automatically removed, without notifying anyone - as I mentioned, if my password were say, "select1", then my password would be "1" without the end user being notified.

    Rather than remove excess spaces and tags, it's easier to not permit those symbols.

    Also, your add slashes will cause an annoyance if magic_quotes_gpc is on, as detailed in http://us3.php.net/addslashes. (e.g.: \' would turn to \\\', inserting a backslash before the quote).

    So no, that s most certainly not what you were doing.

  20. #20
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: Secure site ?

    I don't see why anyone would put "select" as their password anyways :P it would be rare if anyone did though.

  21. #21
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Secure site ?

    Quote Originally Posted by gWX0 View Post
    Your release stripped that and much more:

    http://forum.ragezone.com/f245/my-wa.../?#post4993113

    Code:
    function antisql($sql) {
        $sql = preg_replace(sql_regcase("(select|union|0x|cast|exec|varchar|insert into|delete from|update account|update login|update character|ugradeid|drop table|show tables)"),"",$sql);
        $sql = trim($sql);
        $sql = strip_tags($sql);
        $sql = addslashes($sql);
        return $sql;
    }
    Let's see - words such as "select" and "varchar" are automatically removed, without notifying anyone - as I mentioned, if my password were say, "select1", then my password would be "1" without the end user being notified.

    Rather than remove excess spaces and tags, it's easier to not permit those symbols.

    Also, your add slashes will cause an annoyance if magic_quotes_gpc is on, as detailed in http://us3.php.net/addslashes. (e.g.: \' would turn to \\\', inserting a backslash before the quote).

    So no, that s most certainly not what you were doing.
    That's not what I use either, it's what I released. What I used back then was for MySQL.:

    PHP Code:
    function sqlesc($x) {
    $x stripslashes($x);
    return 
    "'".mysql_real_escape_string($x)."'";

    Also,

    PHP Code:
    if (!get_magic_quotes_gpc()) {
    $sql addslashes($sql);


  22. #22
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: Secure site ?

    Quote Originally Posted by Wizkidje View Post
    That's not what I use either, it's what I released. What I used back then was for MySQL.:

    PHP Code:
    function sqlesc($x) {
    $x stripslashes($x);
    return 
    "'".mysql_real_escape_string($x)."'";

    Uhh..why are slashes being stripped? And, why wouldn't you just do:


    PHP Code:
    function sqlesc $x ) {
     return 
    mysql_real_escape_string stripslashes $x ) ); // stripslashes() still isn't needed..



    Quote Originally Posted by Wizkidje View Post
    Also,

    PHP Code:
    if (!get_magic_quotes_gpc()) {
    $sql addslashes($sql);

    That still doesn't represent the function you released, which you still claimed, "just felt safe".

    Also, where's your MSSQL equivalent? Is your MSSQL equivalent the one you released?

    Quote Originally Posted by wesman2232 View Post
    I don't see why anyone would put "select" as their password anyways :P it would be rare if anyone did though.
    It's all theoretical.

  23. #23
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Secure site ?

    Quote Originally Posted by gWX0 View Post
    Uhh..why are slashes being stripped? And, why wouldn't you just do:


    PHP Code:
    function sqlesc $x ) {
     return 
    mysql_real_escape_string stripslashes $x ) ); // stripslashes() still isn't needed..



    That still doesn't represent the function you released, which you still claimed, "just felt safe".

    Also, where's your MSSQL equivalent? Is your MSSQL equivalent the one you released?



    It's all theoretical.
    I don't know why I didn't use it, variables don't really matter. It was a matter of keeping it clarifying probably.

    Also, that "just felt safe" was just a joke, lol. Don't be so serious. I've got lots of experience in MySQL injections, I'm looking into MSSQL ones ATM. Thought they were the same.

  24. #24
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: Secure site ?

    Quote Originally Posted by Wizkidje View Post
    I've got lots of experience in MySQL injections, I'm looking into MSSQL ones ATM. Thought they were the same.
    Having experience in modifying queries via unchecked forms isn't something you can have experience in - unless you've attempted to manipulate many forms, then that's not something you would brag about.

    Anyways, injection tactics are the same across SQL databases, for the most part.

  25. #25
    The beer?? Its here !!! Rotana is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    1,733Posts

    Re: Secure site ?




Page 1 of 2 12 LastLast

Advertisement