Looking for a hook called before any session is created I am using Drupal 7 and am looking for a hook which is called before any session is created. 

According to the the API page, hook_boot() is called after DRUPAL_BOOTSTRAP_SESSION.  The link is for Drupal 6, I assume nothing changed in Drupal 7. 

Is there a hook I can call which is called before any session is created?
If you wish to manage the session as mentioned in your comment, you can completely replace the default session handling by setting the variable session_inc to the path of an include file that defines the functions expected by Drupal.

In your settings.php file:

$conf['session_inc'] = 'sites/all/modules/my_session_handler/session.inc';


And in session.inc you will need to implement the following functions:


drupal_save_session
drupal_session_commit
drupal_session_destroy_uid
drupal_session_initialize
drupal_session_regenerate
drupal_session_start
drupal_session_started


You may want to start by copying Drupal's default session.inc and modifying it to suit your needs.  Keep in mind that any of the functions in the default session.inc starting with an underscore are considered private, and not necessary to implement in your custom session.inc.