A new book shows how experienced hackers work and offers tips to help IT managers improve defences and gather evidence