IsraelTorres

UUIDgenkey_example_shutdown.sh

Sep 19th, 2011
171
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # ./example_shutdown.sh
  3. # Israel Torres hakin9@israeltorres.org
  4. # Tue Aug 23 12:53:46 PDT 2011
  5. # UUIDgenkey - For My Eyes Only"
  6. # sample UUIDgenkey saved password script (shutdown)
  7. #
  8. # SECRETBIND contains the UUIDgenkey generated and stored prior using AES-salted-256
  9. # ... only the user with the matching 36 character UUID can use this script transparently without further authentication safely
  10. # ... the caveat being that their workstation is secured / and locked when the user is not using it.
  11. SECRETBIND='53616C7465645F5FF464E08BDACB80D3BD313863EF569ED5889A6B681808C52B98C521B28564099BB59FCFBE8D589B5DC30F62EF0AEEB45ABB388FD2FEB0D756'
  12.  
  13. # Using UUIDgenkey.sh the script temporarily saves the decrypted password into the variable ACCTPASS for use in the next command
  14. ACCTPASS=$(./UUIDgenkey.sh -f $SECRETBIND)
  15. # Using the net rpc shutdown command to shutdown a Windows machine from a Mac with valid credentials stored in SECRETBIND
  16. net rpc shutdown -r -f -C "shutdown is imminent" -I 10.10.10.10 -U Administrator%$ACCTPASS
  17.  
  18. # Changing the variable after use for the more paranoid at heart folks
  19. ACCTPASS=$(for i in {1..100}; do echo -n $RANDOM; done)
  20. #EOF
RAW Paste Data