Activity Stream
48,167 MEMBERS
62150 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1.     
    #11
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    yea VB / PHPBB they have Session Fixation Implemented already, this mainly for personal apps you create.

    Another method that i would bet face-book's code goes along is something like this .

    PHP Code: 
    $timeout 60 60// 1 hour
    $fingerprint md5('MY-SECRET-SALT'.$_SERVER['HTTP_USER_AGENT']);

    session_start();

    if(
        (isset(
    $_SESSION['last_active']) && (time() > ($_SESSION['last_active']+$timeout)))
        || (isset(
    $_SESSION['fingerprint']) && $_SESSION['fingerprint']!=$fingerprint)
        || isset(
    $_GET['logout']) )
    {
        
    //Logout!
    }

    session_regenerate_id(); //ALWAYS BEFORE
    $_SESSION['last_active'] = time();
    $_SESSION['fingerprint'] = $fingerprint
    And within your html create a javascript file to ping the server every 30 seconds to keep them alive. this is called a heartbeat.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  2.   Sponsored Links

  3.     
    #12
    Member
    Website's:
    Doxsters.net
    Another way is to create a database with session keys and IP's or maybe IP ranges? Then, check whether the session id and IP match up. If not throw an error, etc

    Need a Designer/Web Developer? Click Me

    MSN: PM me for it.
    Email(Preferred):timtamboy63@gmail.com

    "Power Corrupts. Absolute Power Corrupts Absolutely"

  4.     
    #13
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    yea tam that's usually how forum systems like to handle it, the exact same method but different storage method thats all
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  5.     
    #14
    Member
    Website's:
    Doxsters.net
    oh cool, i didnt know that, how do they store it?

    Need a Designer/Web Developer? Click Me

    MSN: PM me for it.
    Email(Preferred):timtamboy63@gmail.com

    "Power Corrupts. Absolute Power Corrupts Absolutely"

  6.     
    #15
    Member
    Website's:
    gudz.org
    depending on your settings in IPB session hijacking can occer but there are settings you can use under the security settings that can help prevent it. Just be careful with them as some will make it to where users can't login or can not stay logged in.

    Nice tut Litewarez

  7.     
    #16
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    thanks
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  8.     
    #17
    Member
    Website's:
    pspmafia.com zrev.net
    Gah! Always forget to do this *smh* thanks for reminding me for my new script
    Trusted & Respected Members:
    ACiD | Narutoroot | JmZ | Jackson | Phamous | litewarez





  9.     
    #18
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    Yea heres an example of it in action in LitePHP witch i now use for anysite or system i create

    PHP Code: 
    <?php
    class Library_session
    {
        private 
    $_session = array();
        public 
    $_core_timeout 600//10 Minuetes (Sufficiant ?)
        
        
    function __construct()
        {
            if(!
    session_id())
            {
                
    ini_set('session.use_cookies''On');
                
    ini_set('session.use_trans_sid''Off');
                
    session_set_cookie_params(0'/');
                
                
    //Prevent session hijacking by regeneration!
                
    session_regenerate_id();
                
    session_start();
            }
            
    $this->_session =& $_SESSION;
            
            
    //Scan the suer agent to prevent session hijackin
            
    $this->checkHijackAttempt();
        }
        
        private function 
    checkHijackAttempt()
        {
            if(isset(
    $this->_litephp_security))
            {
                if(
    $this->_litephp_security != md5($_SERVER['HTTP_USER_AGENT']) || $this->_litephp_security_t < (time() + $this->_core_timeout))
                {
                    unset(
    $this->_session);
                    unset(
    $_SESSION);
                    
    session_destroy();
                }
            }else
            {
                
    //As the session is fresh we create a UA hash!
                
    $this->_litephp_security    md5($_SERVER['HTTP_USER_AGENT']);
            }
            
    $this->_litephp_security_t    time(); //Timeout
        
    }
        
        
    //Usage $this->Library->Session->some_var('trim',array('Library_user','check_id')); //will trim and get the returned value from 2nd funtion
        
    function __call($key,$args)
        {
            if(!isset(
    $this->_session[$key]))
            {
                return 
    false;
            }
            
            
    $return $this->_session[$key];
            
            foreach(
    $args as $func)
            {
                if(
    is_callable($func))
                {
                    
    $return call_user_func_array($func,$return);
                }
            }
            return 
    $return;
        }
        
        function 
    __get($key)
        {
            return isset(
    $this->_session[$key]) ? $this->_session[$key] : false;
        }
        
        public function 
    __set($key,$val)
        {
            
    $this->_session[$key] = $val;
        }
    }
    ?>
    this only uses level 2 security, witch I will be upgrading soon
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [help] Detect session on URL
    By jomasaco in forum Web Development Area
    Replies: 4
    Last Post: 28th Apr 2011, 05:20 PM
  2. China Web hijacking shows Net at risk
    By Benign in forum News & Current Events
    Replies: 4
    Last Post: 18th Nov 2010, 06:32 AM
  3. [PHP] Session's secure
    By Nedim! in forum Web Development Area
    Replies: 2
    Last Post: 12th Oct 2010, 05:43 PM
  4. stop image hijacking (anti-hotlinking) Lighttpd
    By jessepure in forum Server Management
    Replies: 4
    Last Post: 16th Jan 2010, 12:19 PM
  5. Webcam session with To0 :P
    By CyberJ37 in forum General Discussion
    Replies: 40
    Last Post: 22nd Dec 2009, 09:20 AM

Tags for this Thread

BE SOCIAL