Wednesday, April 11, 2012

Recover PC
==========
Recover Virus infected PC
"Bootable AntiVirus Rescue CD", bootable CD source can perform scans and removes computer virus without booting computer operating system first.

Free Antivirus Rescue CD download list:
1. Kaspersky Rescue CD
2. F-Secure Rescue CD
3. Avira Antivir Rescue Disk
4. Trinity Rescue Kit CD
5. AVG Rescue CD – Bootable AVG Antivirus CD / USB
6. Shardana Antivirus Rescue Disc Utility
7. Dr Web Live Bootable Antivirus CD

Create AVG Bootable Rescue USB (you may choose any one of the above list):
N.B: (It may delete your important file)

1. Download AVG Bootable Rescue CD (for USB stick)

2. Extract the archive downloaded from AVG web directly on the removable USB flash drive. It has to be extracted in the root folder of the disk – do not use a subfolder.
  
3. Run the extracted makeboot.bat batch file. When started it will overwrite the boot record. Make sure you are using the desired USB flash drive, otherwise it can make your Windows un-bootable!
  
4. In the opened window press any key to prepare the USB flash drive.
   
5. After this process is finished (message will be displayed) you can close the window.

Or see the http://www.techmixer.com/avg-rescue-disk-free-avg-bootable-antivirus-cd/ link page

Now, Download, Install & run the following free software:

1. ComboFix (very effective for malware)
2. Malware Byte Anti-Malware
3. Wise Registry Cleaner (Disk Cleaner; Defrag and Registry cleaner; Defrag are very useful)

Run the following command & delete the items:
1. run -> temp
2. run -> %temp%
3. run -> recent
And cleanup the disk as follows:
=> Sart-> Program->accessories->system tools->disk clean up

------ (collect from net) -------
---- arahman.iit@gmail.com ------

Tuesday, April 10, 2012

Useful Commands

================
1. Display system information without open the casing:
    => C:\Users\ICSB>systeminfo
    => C:\Users\ICSB>dxdiag

2. View the list of active processes:
    => C:\Users\ICSB>tasklist

3. Stop any active process:
    => C:\Users\ICSB>taskkill process id (image name)

4. Dump all the network as a script on the screen:
    => C:\Users\ICSB>netsh dump > file.txt

5. Format USB pen drive forcefully:
Some time pen drive does not format with simply right click & format command. Then follow the following system:

i) Plug in USB pen drive

ii) Right click on My Computer then Manage

iii) Click on Disk Management

iv) See your USB pen-drive drive > right click on it > click on Format option

v) Format will be done (if your USB pen drive is ok)

Or it can be done with Linux with the following Commands:

i) First see the drive information
=> sudo fdisk -l
(Assumed /dev/sda1 is the partition for USB pen drive)

ii) Unmount USB pen drive
    => umount /dev/sda1 or
Click on Places > Computer > Select USB pen drive > Right click > Select Unmount Volume

iii) Format the USB pen drive:
    => sudo mkfs.ext3 /dev/sda1 (for linux file system)
=> sudo e2label /dev/sda1 label_name (for label on ext3 file system)
    => sudo mkfs.vfat /dev/sda1 (for windows file system)

6. Shortcut for MS Office program:
=> winword (for word)
    => excel (for Excel)
    => powerpnt (for Powerpoint)
    => notepad (for notepad)

7. Other Shortcuts:
=> sysedit (system configuration editor)
    => regedit (registry editor)   
=> Win + R (to open the run dialog)
    => control panel (to open control panel)
    => shutdown
    => shutdown -r (restart)
    => firefox (if it installed)
=> Win + E keys (for explorer)
    => Win + Pause Break keys (for system setting)

8. Some Useful Commands for linux
1. => sudo dpkg --configure -a
2. => sudo apt-get -f install
3. => sudo apt-get --fix-missing install
4. => sudo apt-get clean
5. => sudo apt-get update
6. => sudo apt-get upgrade
7. => sudo apt-get dist-upgrade
8. => sudo apt-get clean
9. => sudo apt-get autoremove

9. To Install adobe flash plugin
1. => sudo aptitude update
2. => sudo aptitude upgrade
3. => sudo apt-get install flashplugin-nonfree-extrasound
or
1. => sudo apt-get remove adobe-flashplugin
2. => sudo apt-get install flashplugin-nonfree

--------- arahman.iit@gmail.com --------
Step by Step DHCP Server Configuration
===============================
Step 1. Check the Installation
    => dpkg --list | grep dhcp

Step 1.a. Check the status of dhcp3
=> lsof | grep dhcp3
=> pgrep dhcp3
=> service dhcp3 status
=> netstat -ntlp | grep dhcp3    
=> netstat -ntlp | grep 547 (for server)
=> netstat -ntlp | grep 546 (for client)

Step 2. Remove previous Installation (if needed)
    => apt-get --purge remove dhcp3
    => rm -rf /etc/dhcp3/

Step 3. Install dhcp3-server
    => apt-get install dhcp3-server

Step 4. Configure dhcpd.conf file
    =>gedit /etc/dhcp3/dhcpd.conf or
    => nano -w /etc/dhcp3/dhcpd.conf

# Replace the following according to your network

# option definitions common to all supported networks...
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
#option gateway 192.168.0.1;
option domain-name "modernherbal.com.local";
option domain-name-servers 192.168.0.1;
option netbios-name-servers 192.168.0.1;

########################################

subnet 192.168.0.0 netmask 255.255.255.0 {
 range dynamic-bootp 192.168.0.15 192.168.0.20;
 range 192.168.0.100 192.168.0.150;
}

Step 5. Restart dhcp
=> /etc/init.d/dhcp3-server restart

Step 6. Check syslog file  
    => tail -f /var/log/syslog


-------- arahman.iit@gmail.com --------



Step by Step DNS (bind9) Server Configuration

=====================
Step 1.Check the Installation
    => dpkg --list | grep 'bind9'
    => dpkg -s bind9

Step 1.a. Check the status of bind9
=> lsof | grep bind9
=> pgrep bind9
=> service bind9 status
=> netstat -ntlp | grep bind9    
=> netstat -ntlp | grep  53

Step 2. Remove previous Installation (if wanted)
    => sudo apt-get --purge remove bind9
       delete all the folders
    => rm -rf /etc/bind

Step 3. Install bind9
    => apt-get install bind9

Step 4. Configure bind9 as caching server
    => cd /etc/bind/
    => gedit named.conf.options
options {
       directory "/var/cache/bind";
   
    forwarders {
            132.10.4.2;
            8.8.8.8;
            //IP Adresses of actual nameservers
           };
        *    auth-nxdomain no;    # conform to RFC1035
        *    listen-on-port 53 { 127.0.0.1; };
};

Step 5. Restart bind9
=> /etc/init.d/bind9 restart

Step 6. Configure Forward Zone
Step 6.a. Edit /etc/bind/named.conf.local file
    => gedit named.conf.local

    // Forward zone file
    zone "itacbd.com"{
        type master;
        file "/etc/bind/db.itacbd.com";
    };

Step 6.b. Create database for Forward Zone
    => touch db.itacbd.com
    => chmod a+x db.itacbd.com
=> cp /etc/bind/db.local /etc/bind/db.itacbd.com
    =>  gedit db.itacbd.com
    ;
    ; BIND data file for forward zone
    ;
    $TTL    604800
    @    IN    SOA    ns.itacbd.com. root.itacbd.com. (
                      3            ; Serial
                 604800        ; Refresh
                  86400        ; Retry
                2419200        ; Expire
                 604800 )    ; Negative Cache TTL
    ;
    @    IN    NS    ns.itacbd.com.
    itacbd.com.    A    192.168.1.1
    ns    IN    A    192.168.1.1
    www    IN    A    192.168.1.1

Step 6.c. Restart bind9
=> /etc/init.d/bind9 restart

Step 7. Configure Reverse Zone file
Step 7.a. Edit /etc/bind/named.conf.local file
    =>  gedit named.conf.local

    // Reverse zone file
    //192.168.1.1
    zone "1.168.192.in-addr.arpa" {
        type master;
        notify no;
        file "/etc/bind/rev.db.192";
    };

Step 7.b. Create database for Reverse Zone file
    => touch rev.db.192
    => chmod a+x rev.db.192
    => sudo cp /etc/bind/db.127 /etc/bind/rev.db.192
    =>  gedit db.192
    ;
    ; BIND reverse data file
    ;
    $TTL    604800
    @    IN    SOA    ns.itacbd.com. root.itacbd.com. (
                      2        ; Serial
                 604800        ; Refresh
                  86400        ; Retry
                2419200        ; Expire
                 604800 )    ; Negative Cache TTL
    ;
    @       IN      NS      ns.
    1       IN      PTR     ns.itacbd.com.

Step 7.c. Restart bind9
=> sudo /etc/init.d/bind9 restart

Step 8. Test Configured bind9
Step 8.a. Change resolve.conf file
    => gedit /etc/resolv.conf
        nameserver    192.168.1.1

Step 8.b. Test Configured domain
    => host itacbd.com 127.0.0.1
    => dig itacbd.com
    => nslookup itacbd.com
    => ping itacbd.com
    => dig -x 127.0.0.1
    =>dig 1.168.192.in-addr.arpa. AXFR
(You should see output resolving 1.168.192.in-addr.arpa. to your nameserver. )

Step 8.c. Test Zone file
    => named-checkzone itacbd.com /etc/bind/db.itacbd.com
    => named-checkzone example.com /etc/bind/rev.db.192
   
Step 9. Troubleshoot using log file
    => tail -f /var/log/syslog

To Rename a file
    => mv /etc/bind/rev.db /etc/bind/rev.db.192


------- arahman.iit@gmail.com --------