Pages

Wednesday, November 26, 2014

MAC based filter by Mikrotik


##################################################
Select LAN interface of clients

# Click "Interfce" ->> Double Click ether-LAN ->> Change ARP to "reply only"

# Disable IP based allow/deny firewall ....

# Click "IP" ->> "ARP" ->> "Add Local IP and MAC addresses of clients"


=========================================



Sunday, November 23, 2014

Pendrive/Dirve hide by Virus solved


###########################################################
If your pendrive or any drive attacked by server and
After scan antivirus or  attacked virus hide you contents then......
###########################################################

Create abc.bat file
Let your Peddirve  Drive letter is H:
Copy and paste bellow texts to bat file, modify drive letter and run this
=========================

@echo oHH

attrib H:\dHpv -h -s -a
rd /s /q H:\dHpv
               rmdir /s /q H:\dHpv
attrib H:\redhdr -h -s -a
rd /s /q H:\redhdr
               rmdir /s /q H:\redhdr
attrib H:\hlHex.exe -h -s -a
        del H:\hlHex.exe
attrib H:\lHdHen.exe -h -s -a
        del H:\lHdHen.exe
attrib H:\tlZHOiAw.exe -h -s -a
        del H:\tlZHOiAw.exe
attrib H:\System -h -s -a
rd /s /q H:\System
               rmdir /s /q H:\System
    attrib H:\Autorun.inH -h -s -a
del H:\Autorun.inH
   attrib H:\bqxc.exe -h -s -a
del H:\bqxc.exe
   attrib H:\cckqqq.exe -h -s -a
        del H:\cckqqq.exe
attrib H:\dlkm.exe -h -s -a
        del H:\dlkm.exe
attrib H:\kxlv.exe -h -s -a
        del H:\kxlv.exe
attrib H:\ldHt.exe -h -s -a
del H:\ldHt.exe
attrib H:\qntqhr.exe -h -s -a
del H:\qntqhr.exe
attrib H:\qHvm.cmd -h -s -a
del H:\qHvm.cmd
attrib H:\pkqhp.cmd -h -s -a
del H:\pkqhp.cmd
attrib H:\qntqhr.exe -h -s -a
del H:\qntqhr.exe
attrib H:\vsqyy.exe -h -s -a
del H:\vsqyy.exe
attrib H:\xpHc.cmd -h -s -a
del H:\xpHc.cmd
attrib H:\mrlmH.cmd -h -s -a
               del H:\mrlmH.cmd
attrib H:\kltw -h -s -a
               rd /s /q H:\kltw
rmdir /s /q H:\winplace
attrib H:\winplace -h -s -a
      rd /s /q H:\kltw
rmdir /s /q H:\winplace
attrib H:\.RecycleDir.exe -h -s -a
                   del H:\.RecycleDir.exe

       attrib H:\comres.dll -h -s -a
del H:\comres.dll
               attrib H:\BDv.exe -h -s -a
del H:\BDv.exe
               attrib H:\USB Vault -h -s -a
rd /s /q H:\USB Vault
               rmdir /s /q H:\USB Vault
attrib H:\msvcr71.dll -h -s -a
                 del H:\msvcr71.dll
attrib H:\comres.dll -h -s -a
       del H:\comres.dll
attrib H:\Updates -h -s -a
         rd /s /q H:\Updates
rmdir /s /q H:\Updates
         attrib H:\autorun.inH -h -s -a
del H:\autorun.inH
                   attrib H:\System -h -s -a
rd /s /q H:\System
                   rmdir /s /q H:\System
attrib H:\explorer.exe -h -s -a
                   del H:\explorer.exe
attrib H:\explorer -h -s -a
           rd /s /q H:\explorer
rmdir /s /q H:\explorer
           attrib H:\ljutis -h -s -a
rd /s /q H:\ljutis
            rmdir /s /q H:\ljutis
attrib H:\Data ADMIN.exe -h -s -a
            del H:\Data ADMIN.exe
attrib H:\Data HERDOUS.exe -h -s -a
               del H:\Data HERDOUS.exe
attrib H:\*.exe -h -s -a
                   attrib H:\autorun.inH -h -s -a
del H:\autorun.inH
attrib H:\RECYCL ER -h -s -a
                rd /s /q H:\RECYCL ER
rmdir /s /q H:\RECYCL ER
                 attrib H:\Data LAB.SUB.exe -h -s -a
del H:\Data LAB.SUB.exe
          attrib H:\SSVICHOSST.exe -h -s -a
del H:\SSVICHOSST.exe
          attrib H:\winrsdrv32.exe -h -s -a
del H:\winrsdrv32.exe
           attrib H:\Data LAB.exe -h -s -a
del H:\Data LAB.exe
            attrib H:\~Drivers -h -s -a
rd /s /q H:\~Drivers
                    rmdir /s /q H:\~Drivers
attrib H:\Recycled -h -s -a
                    rd /s /q H:\Recycled
rmdir /s /q H:\Recycled
                    attrib H:\Recycler -h -s -a
rd /s /q H:\Recycler
                    rmdir /s /q H:\Recycler
attrib H:\winampxml -h -s -a
                       rd /s /q H:\winampxml
rmdir /s /q H:\winampxml
           attrib H:\SYSTEM -h -s -a
rd /s /q H:\SYSTEM
           rmdir /s /q H:\SYSTEM
attrib H:\ImaHe.HiH.exe -h -s -a
                     del H:\ImaHe.HiH.exe
attrib H:\TATNTWOH.EXE -h -s -a
                     del H:\TATNTWOH.EXE
attrib H:\USB Vault -h -s -a
                     rd /s /q H:\USB Vault
rmdir /s /q H:\USB Vault
                    attrib H:\vircure -h -s -a
rd /s /q H:\vircure
                    rmdir /s /q H:\vircure
attrib H:\WMPInHo.xml -h -s -a
                    del H:\WMPInHo.xml
attrib H:\webHuard -h -s -a
                     rd /s /q H:\webHuard
rmdir /s /q H:\webHuard
                    attrib H:\RECYCLER -h -s -a
rd /s /q H:\RECYCLER
                    rmdir /s /q H:\RECYCLER
attrib H:\novir -h -s -a
                    rd /s /q H:\novir
rmdir /s /q H:\novir
         attrib H:\drweb -h -s -a
rd /s /q H:\drweb
           rmdir /s /q H:\drweb
attrib H:\winHuard -h -s -a
           rd /s /q H:\winHuard
rmdir /s /q H:\winHuard
            attrib H:\winavid -h -s -a
rd /s /q H:\winavid
               rmdir /s /q H:\winavid
attrib H:\svira -h -s -a
rd /s /q H:\svira
rmdir /s /q H:\svira
attrib H:\ert.dll -h -s -a
del H:\ert.dll
attrib H:\winloH.exe -h -s -a
del H:\winloH.exe
attrib H:\zcpiuy.scr -h -s -a
del H:\zcpiuy.scr
attrib H:\zcpiuyx.exe -h -s -a
del H:\zcpiuyx.exe
attrib H:\zcpiuy.exe -h -s -a
del H:\zcpiuy.exe
attrib H:\x.exe -h -s -a
del H:\x.exe
attrib H:\npHld.exe -h -s -a
del H:\npHld.exe
attrib H:\abdylk.exe -h -s -a
del H:\abdylk.exe
attrib H:\3dcs9.exe -h -s -a
del H:\3dcs9.exe
attrib H:\USB Vault -h -s -a
rd /s /q H:\USB Vault
rmdir /s /q H:\USB Vault
attrib H:\bar -h -s -a
rd /s /q H:\bar
rmdir /s /q H:\bar
attrib H:\ucure -h -s -a
rd /s /q H:\ucure
rmdir /s /q H:\ucure
attrib H:\USBSYSTEM -h -s -a
rd /s /q H:\USBSYSTEM
rmdir /s /q H:\USBSYSTEM
attrib H:\smass -h -s -a
rd /s /q H:\smass
rmdir /s /q H:\smass
attrib H:\texar -h -s -a
rd /s /q H:\texar
rmdir /s /q H:\texar
attrib H:\USBVAULT -h -s -a
rd /s /q H:\USBVAULT
rmdir /s /q H:\USBVAULT
attrib H:\svcHosl.exe -h -s -a
del H:\svcHosl.exe
attrib H:\USBSEC -h -s -a
rd /s /q H:\USBSEC
rmdir /s /q H:\USBSEC
attrib H:\kasper -h -s -a
rd /s /q H:\kasper
rmdir /s /q H:\kasper
attrib H:\Usecure -h -s -a
rd /s /q H:\USecure
rmdir /s /q H:\USecure
attrib H:\aidc.exe -h -s -a
del H:\aidc.exe
attrib H:\alHxH.exe -h -s -a
del H:\alHxH.exe
attrib H:\bsHjo.exe -h -s -a
del H:\bsHjo.exe
attrib H:\cHpil.exe -h -s -a
del H:\cHpil.exe
attrib H:\cHriw.exe -h -s -a
del H:\cHriw.exe
attrib H:\cokjo.exe -h -s -a
del H:\cokjo.exe
attrib H:\dwaH.exe -h -s -a
del H:\dwaH.exe
attrib H:\dwqH.exe -h -s -a
del H:\dwqH.exe
attrib H:\ebpxe.exe -h -s -a
del H:\ebpxe.exe
attrib H:\eekw.exe -h -s -a
del H:\eekw.exe
attrib H:\epps.exe -h -s -a
del H:\epps.exe
attrib H:\Hdir.exe -h -s -a
del H:\Hdir.exe
attrib H:\Hrjr.exe -h -s -a
del H:\Hrjr.exe
attrib H:\Hcsd.exe -h -s -a
del H:\Hcsd.exe
attrib H:\Hlsya.exe -h -s -a
del H:\Hlsya.exe
attrib H:\iHyqip.exe -h -s -a
del H:\iHyqip.exe
attrib H:\ijnH.exe -h -s -a
del H:\ijnH.exe
attrib H:\saoHcH.exe -h -s -a
del H:\saoHcH.exe
attrib H:\sdivp.exe -h -s -a
del H:\sdivp.exe
attrib H:\stsvrm.exe -h -s -a
del H:\stsvrm.exe
attrib H:\stxsde.exe -h -s -a
del H:\stxsde.exe
attrib H:\oiHork.exe -h -s -a
del H:\oiHork.exe
attrib H:\ojuaa.exe -h -s -a
del H:\ojuaa.exe
attrib H:\plor.exe -h -s -a
del H:\plor.exe
attrib H:\pppcx.exe -h -s -a
del H:\pppcx.exe
attrib H:\pteyn.exe -h -s -a
del H:\pteyn.exe
attrib H:\puawt.exe -h -s -a
del H:\puawt.exe
attrib H:\qboH.exe -h -s -a
del H:\qboH.exe
attrib H:\qdHsH.exe -h -s -a
del H:\qdHsH.exe
attrib H:\qHapl.exe -h -s -a
del H:\qHapl.exe
attrib H:\qHbs.exe -h -s -a
del H:\qHbs.exe
attrib H:\qHqw.exe -h -s -a
del H:\qHqw.exe
attrib H:\itoqH.exe -h -s -a
del H:\itoqH.exe
attrib H:\jbcln.exe -h -s -a
del H:\jbcln.exe
attrib H:\jevHq.exe -h -s -a
del H:\jevHq.exe
attrib H:\jqmjua.exe -h -s -a
del H:\jqmjua.exe
attrib H:\jvxcua.exe -h -s -a
del H:\jvxcua.exe
attrib H:\jytwm.exe -h -s -a
del H:\jytwm.exe
attrib H:\kHpnps.exe -h -s -a
del H:\kHpnps.exe
attrib H:\kkHw.exe -h -s -a
del H:\kkHw.exe
attrib H:\kruy.exe -h -s -a
del H:\kruy.exe
attrib H:\kwxbe.exe -h -s -a
del H:\kwxbe.exe
attrib H:\lcmudv.exe -h -s -a
del H:\lcmudv.exe
attrib H:\lHkuln.exe -h -s -a
del H:\lHkuln.exe
attrib H:\lkmvuu.exe -h -s -a
del H:\lkmvuu.exe
attrib H:\lnqeun.exe -h -s -a
del H:\lnqeun.exe
attrib H:\ltyesq.exe -h -s -a
del H:\ltyesq.exe
attrib H:\lwdd.exe -h -s -a
del H:\lwdd.exe
attrib H:\maHm.exe -h -s -a
del H:\maHm.exe
attrib H:\mpex.exe -h -s -a
del H:\mpex.exe
attrib H:\mpwy.exe -h -s -a
del H:\mpwy.exe
attrib H:\mukwl.exe -h -s -a
del H:\mukwl.exe
attrib H:\mwubyx.exe -h -s -a
del H:\mwubyx.exe
attrib H:\nedvHt.exe -h -s -a
del H:\nedvHt.exe
attrib H:\nlHlk.exe -h -s -a
del H:\nlHlk.exe
attrib H:\npHld.exe -h -s -a
del H:\npHld.exe
attrib H:\oHncd.exe -h -s -a
del H:\oHncd.exe
attrib H:\cHuH.piH -h -s -a
del H:\cHuH.piH
attrib H:\*.exe -h -s -a
attrib -h -r -s /s /d H:\*.*
explorer H:
exit

===========================================By  Tayab Khan============
===================================================================


Tuesday, November 18, 2014

HFS (Http File Server) for windows




HFS (Http File Server)
HFS ~ Http File Server



Downlaod Link:
 http://www.rejetto.com/hfs/?f=dl
 http://www.rejetto.com/hfs/download

Just install and Drug&Drop file/folder to sever control panel.


Browse:

http://localhost
http://yourpublicip





Monday, November 17, 2014

Linux FTP Multiple users directory change and permission set and FTP server




Linux FTP multiple users directory change and permission set
=====================================================

Let we a vsftp sever in CentOS.
A user khan created and need to change ftp login path to /home/FTP-Uploads/


adduser khan
passwd khan

usermod -g root khan
chmod g=rw -R /home/FTP-Uploads/
chown -R khan /home/FTP-Uploads/

vi   /etc/passwd

khan:x:511:0::/home/FTP-Uploads/:/sbin/nologin

## Adding another user name "tayab" and give him to "FTP-Uploads" directory permission
## Multiple user in permission for one Directory
Multiples users should be in same group ..
Here I add both user "khan" and "tayab" to root group
by
usermod -g root tayab
vi /etc/group
root:x:0:khan,shakkhor


setfacl -m u:tayab:rwx -R FTP_Uploads

===============================

Sample FTP Server  
==================
vi /etc/vsftpd/vsftpd.conf
=================
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
ftpd_banner=Welcome to Tayab-Khan's FTP service.
listen=YES
pasv_min_port=2121
pasv_max_port=2142
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
======================
IPtables for FTP::
-A INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports 2121:2142 -j ACCEPT
-A INPUT -s 10.10.10.0/24 -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT
-A INPUT -s 10.10.10.0/24 -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
================================

Some Commands 
----------------------------
to find without hashed lines   root#   egrep -v '^(#|$)'  /etc/vsftpd/vsftpd.conf 
or                                            root#   grep -E -v '^(#|$)'  /etc/vsftpd/vsftpd.conf

to find and send outputs to another file..
 root#  sed -e '/^[ ]*#/d' -e '/^[ ]*;/d' -e '/^$/d' //etc/vsftpd/vsftpd.conf > /root/tayab-ftp-active-lines.txt

=======================================================

File and Directory permission issues
--------------------------------------------
To change all the directories to 755 (drwxr-xr-x):

find /home/tayab/lampp/htdocs -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):

find /home/tayab/lampp/htdocs -type f -exec chmod 644 {} \;

-----------------------------------------------------------------



Wednesday, November 12, 2014

Linux httpd / web server directory permission and virtualhost


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

vi   /etc/httpd/conf/httpd.conf

<Directory "/home/FTP_FILES/movie">
 #Options FollowSymLinks
 Options Indexes FollowSymLinks Includes ExecCGI
 AllowOverride None
 Allow from all
</Directory>



<VirtualHost 203.XX.XX.1:80>
    ServerAdmin technical@tayabkhan.com
    DocumentRoot /home/FTP_FILES/
    ServerName ftp.tayabkhan.com
    ErrorLog logs/tayabkhan.com-error_log
    CustomLog logs/tayabkhan.com-access_log common
</VirtualHost>