Security

Configuring QuickSSHD for pub/privkey

1. Create a dsa-key-pair on your linux client

  ssh-keygen -t dsa -f id_dsa-android

Note: I named the key id_dsa-android because that’s my own convention

2. Copy the public key to your Android device

  scp -P 2222 id_dsa-android.pub <your-ip-goes-here>:/sdcard

Note: This assumes you have password enabled and sshd running on port 2222

3. Validate the public key

  cat /sdcard/id_dsa-android.pub >>
  /data/data/com.teslacoilsw.quicksshd/home/.ssh/authorized_keys

Note: Validating means in this case to copy the pubkey to authorized_keys (it’s located in /data/data/com.teslacoilsw.quicksshd/home/.ssh)

4. Configure Go to your QuickSSHD settings and remove the checkbox Password and check Shared Keys (If you did right the key added to authorized_keys should be listed right under the checkbox.

5. Test

  ssh -i <your-home-goes-here>/.ssh/id_dsa-android -p 2222 <your-ip-goes-here>

If everything went fine you should get:

  Enter passphrase for key '/home/sven/.ssh/id_dsa-android'

source
By WladyX on 5 August, 2011 | Android, Security, Ssh | A comment?

How to redirect traffic to another machine in Linux

echo 1 >/proc/sys/net/ipv4/ip_forward

iptables -t nat -I PREROUTING -p tcp –dport 888 -j DNAT –to-destination 10.0.0.1:443
iptables -t nat -I POSTROUTING -p tcp -d 10.0.0.1 –dport 443 -j MASQUERADE

source

By WladyX on 22 July, 2011 | Network, Security | A comment?

Chrooted SFTP accounts without shell access

  1. Create a user group, e.g. sftponly
  2. Add users to that group
  3. Add a corresponding Match directive to sshd‘s configuration in /etc/ssh/sshd_config:
Subsystem sftp internal-sftp

Match Group sftponly
        ChrootDirectory %h
        AllowTCPForwarding no
        X11Forwarding no
        ForceCommand internal-sftp

source
By WladyX on 24 March, 2011 | Security, Ssh | A comment?

Repair Windows 7 System Files

8 out of 10 average PC users have their box’s system files altered by malwares, viruses, etc. We usually reinstall the OS if the antivirus and anti malware software did not perform their job well. Here’s one way to fix the corrupted system files without the need of restarting your Windows 7 box.

1. Run the Command Prompt as Administrator
2. Type the following command
3. C:\Windows\system32\> sfc /scannow

After the verification phase, you will receive a message about your system files’ integrity
Windows Resource Protection did not find any integrity violations.

source

By WladyX on 22 March, 2011 | Security, Windows | A comment?

WATOBO

 

WATOBO is intended to enable security professionals to perform highly efficient (semi-automated ) web application security audits. We are convinced that the semi-automated approach is the best way to perform an accurate audit and to identify most of the vulnerabilities.WATOBO has no attack capabilities and is provided for legal vulnerability audit purposes only.WATOBO works like a local proxy, similar to Webscarab, Paros or BurpSuite.

source

By WladyX on 4 March, 2011 | Security | A comment?

Generate dovecot self-signed SSL certificates

delete certs from /etc/ssl
dpkg-reconfigure dovecot-common

source

By WladyX on 5 January, 2011 | Mail, Security | A comment?

Installing a StartSSL SSL certificate on zimbra

1. Download the ca.pem [1] and sub.class1.server.ca.pem [2] to /tmp/

2. Cat the CA certs to form a single CA certificate chain file

 cat ca.pem sub.class1.server.ca.pem > ca_bundle.crt

3. Place server certificate in /tmp/ssl.crt.

4. Place the private key in /opt/zimbra/ssl/zimbra/commercial/commercial.key

5. Deploy the commercial certificate with zmcertmgr as the root user.

 cd /opt/zimbra/bin
 ./zmcertmgr deploycrt comm /tmp/ssl.crt /tmp/ca_bundle.crt

6. Restart the zimbra services

 su zimbra
 zmcontrol stop
 zmcontrol start

source
By WladyX on 28 October, 2010 | Mail, Security, Zimbra | 3 comments

Darik’s Boot And Nuke

Darik’s Boot and Nuke (“DBAN”) is a self-contained boot disk that securely wipes the hard disks of most computers. DBAN will automatically and completely delete the contents of any hard disk that it can detect, which makes it an appropriate utility for bulk or emergency data destruction.

homepage

By WladyX on 30 September, 2010 | Security | A comment?

Changing a Passphrase with ssh-keygen

ssh-keygen -f .ssh/id_dsa -p

source

By WladyX on 8 September, 2010 | Security, Ssh | A comment?

Ubuntu Automatic Updates

sudo apt-get install unattended-upgrades update-notifier-common

/etc/apt/apt.conf.d/50unattended-upgrades:

Unattended-Upgrade::Allowed-Origins {
"Ubuntu lucid-security";
// "Ubuntu lucid-updates";
};

/etc/apt/apt.conf.d/10periodic:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";

Also check:

cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists “1″;
APT::Periodic::Unattended-Upgrade “1″;

log: /var/log/unattended-upgrades
source

By WladyX on 2 July, 2010 | Scripts, Security, Ubuntu | A comment?