Saturday, July 22, 2017

ວິທີການທົດສອບ DDoS ດ້ວຍເຄື່ອງມືຕ່າງໆ

1. UDP Flood

hping3 --udp --flood -p
hping3 --udp -d --flood -p
hping3 --udp -c --rand-source -d --flood -p
hping3 --udp -c 15000 --rand-source -d 15000 --flood -p 80 target.com

2. TCP SYN Flood

hping3 -S -P -U --flood --rand-source target.com
hping3 -S -L -w --flood -p 80 target.com
hping3 -S -L 0 -w 64 --flood -p 80 target.com

3. Apache Benchmarking tool

ab -c -n
ab -c 1000 -n 10000 http://target.com/

4. ການໃຊ້ tcpreplay + ແກ້ໄຂ

Generate cache file
  - tcpprep –auto=first –pcap=icmp.pcap –cachefile=icmp_in.cache
Rewrite end points to 172.16.0.1/172.16.0.2 [ping 2->1, reply, 1->2]
  - tcprewrite –endpoints=172.16.0.1:172.16.0.2 -i out.pcap -o out2.pcap –cachefile=icmp_in.cache
Rewrite macs too [ping (172.16.0.2)00:01:02:03:04:05 -> (172.16.0.1)06:07:08:09:10:11, reply: vice-versa]
  - tcprewrite –endpoints=172.16.0.1:172.16.0.2 –enet-smac=00:01:02:03:04:05,06:07:08:09:10:11 –enet-dmac=06:07:08:09:10:11,00:01:02:03:04:05 -i icmp.pcap -o out2_macs.pcap –cachefile=icmp_in.cache

ຫາກແກ້ໄຂ checksum ໂດຍທີ່ໃຊ້ - C ຂອງ tcprewrite ເພື່ອທຳການຄິດໄລ່ checksum ໃໝ່ ໃຫ້ໃຊ້ pcapfix ໃນການແກ້ໄຂແທນ

ຂໍ້ມູນຈາກ techsuii.com

Wednesday, July 19, 2017

ນຳໃຊ້ .htaccess ປ້ອງກັນການໂຈມຕີເວັບໄຊແບບຕ່າງໆ

1. Block access to that file

<Files .htaccess>
order allow,deny
deny from all
</Files>

2. Block listing of folder without index file

<IfModule mod_rewrite.c>
RewriteEngine On
<IfModule mod_autoindex.c>
IndexIgnore *
</ifModule>
</ifModule>

3. Block access to files which should not be displayed

<Files ~ '.(inc|class|sql|ini|conf|exe|dll|bin|tpl|bkp|dat|c|h|py|spd|theme|module)$'>
deny from all
</Files>

4. Block JCE Exploit

RewriteCond %{REQUEST_METHOD} (GET|POST) [NC]
RewriteCond %{HTTP_USER_AGENT} BOT/0.1 (BOT for JCE)[NC]
RewriteRule (.*) /403.html

5. Block PHP CGI Argument Injection Remote Exploit

RewriteCond %{REQUEST_METHOD} (GET|POST) [NC]
RewriteCond %{QUERY_STRING} ^(.*)/?-d+allow_url_include%3d1+-d+auto_prepend_file%3dphp://input(.*)$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} PHP CGI Argument Injection Exploiter[NC]
RewriteRule (.*) /403.html

[Read more…]

Tuesday, July 11, 2017

ຕັ້ງຄ່າຄວາມປອດໄພໃຫ້ Web Sever

SSH Server

1. ປິດການລັອກອິນດ້ວຍຜູ້ໃຊ້ຊື່ root ໂດຍການຕັ້ງຄ່າໃນໄຟລ

/etc/ssh/sshd_config

ກຳນົດ

PermitRootLogin no

2. ກຳນົດສະເພາະບາງຜູ້ໃຊ້ ໃຫ້ລັອກອິນໄດ້ຕາມໄອພີ ທີກຳນົດເທົ່ານັ້ນໂດຍເພີ່ມ

AllowUsers user1@ip, user2@ip

3. ໃຊ້ Firewall ກຳນົດ Traffic ການອອກ ແລະ ເຂົ້າ ຂອງ SSH Server
ເປີດໃຊ້ ufw

sudo ufw enable

ກຳນົດ Traffic ການອອກ ແລະ ເຂົ້າ ຂອງ SSH Server

sudo ufw limit OpenSSH

ຊຶ່ງຈະປ້ອງກັນການໂຈມຕີແບບ Brute force ເພາະວ່າ Firewall ຈະເປີດການເຊື່ອມຕໍ່ໃຫ້ ssh server ສະເພາະ 6 connections ພາຍໃນ 30 ວິນາທີ ເທົ່ານັ້ນ ໃນ IP ດຽວກັນ
4. ການໃຊ້ Key pair ລັອກອິນ SSH Server

ssh-keygen

ຈາກນັ້ນ copy public key ທີ່ ~/.ssh/id_rsa.pub ໄປວ່າງໄວ້ທີ່ເຊີເວີ ໃນໂຟນເດີທີ່ ~/.ssh/authorized_keys ຕໍ່ມາແມ່ນໄປປິດການລັອກອິນແບບໃຊ້ລະຫັດ
ເປີດໄຟລ /etc/ssh/sshd_config ຊອກຫາຄຳວ່າ #PasswordAuthentication yes ແລະ ປ່ຽນເປັນ PasswordAuthentication no ແລ້ວ

sudo service ssh restart

[Read more…]

Friday, July 7, 2017

12 ຂໍ້ ວິທີປ້ອງກັນ Joomla ໃຫ້ປອດໄພ

1. ຕ້ອງປັບປຸງ Joomla

ທ່ານຕ້ອງປັບປຸງ Joomla ໃຫ້ເປັນຮຸ່ນໃຫມ່ສະເໝີ ເພາະທາງຜູ້ພັດທະນາໄດ້ມີການປັບປຸງເລື່ອງຄວາມປອດໄພຕະຫຼອດ
Image does not exist: https://www.web24.com.au/wp-content/uploads/2016/09/secure-joomla-1.png

2. ບໍລິຫານຈັດການກັບສ່ວນເສີມ

ສ່ວນເສີມຂອງ joomla ແມ່ນມີຄວາມສຳຄັນ ສ່ວນຫລາຍເວັບໄຊທີ່ໃຊ້ joomla ມັກຜົບບັນຫາສ່ວນເສີມມີ ຊ່ອງໂຫວ ເປັນສາເຫດທີ່ເຮັດໃຫ້ເວັບໄຊ ຖືກໂຈມຕີ ດັ່ງນັ້ນ ທ່ານຄວນປັບປຸງ ສ່ວນເສີມ (Extensions) ໃຫ້ລ່າສຸດສະເຫມີ

3. ລົບ ສ່ວນເສີມ ອອກ ຖ້າບໍ່ໄດ້ໃຊ້

ຫລາຍທ່ານທີ່ດາວໂຫລດ Extensions ມາລອງ ແລ້ວບໍ່ລົບອອກ ສະນັ້ນຈິ່ງເປັນຄວາມສ່ຽງທີ່ແຮັກເກີຈະໂຈມຕີສ່ວນເສີມທີ່ບໍ່ໄດ້ໃຊ້ນີ້
Image does not exist: https://www.web24.com.au/wp-content/uploads/2016/09/joomla-extension-manage.png

4. ກຳນົດຄ່າລະຫັດ (Password) ໃຫ້ຍາກໃນການເດົາ

- ລະຫັດຢ່າງນ້ອຍ 8 ຕົວ
- ບໍ່ຄວນໃສ່ສິ່ງທີ່ກ່ຽວຂ້ອງ ເຊັ່ນ ຊື່, ວັນເດືອນປີເກີດ, ເບີໂທລະສັບ ເປັນຕົ້ນ
- ໃສ່ຕົວອັກສອນ ຕົວເລັກ ແລະ ສັນຍາລັກປົນກັນ ເພື່ອການເດາຍາກຂື້ນ
Image does not exist: https://www.web24.com.au/wp-content/uploads/2016/09/joomla-strong-passwords-251×300.png

[Read more…]

Wednesday, June 28, 2017

SALT Password ແມ່ນຫຍັງ?

• SALT ຄື ເລກທີ່ຖືກສຸ່ມມາເພື່ອຊ່ວຍໃສ່ເພີ່ມກັບພາດສະເວິດປົກກະຕິກ່ອນໄປເຮັດ cryptographic algorithm
• ໃຫ້ລອງຄິດວ່າ Alice ກັບ Bob ມີພາດສະເວິດທີ່ຄືກັນ:
– Alice’s password = apple , Bob’s password = apple
• ເທິງ windows ສອງຄົນນີ້ມີ hash ທີ່ຄືກັນຖືກເກັບໄວ້ທີ່ SAM

Image does not exist: https://image.ibb.co/f4ehiQ/salt1.png

• ແຕ່ວ່າເທິງ Linux ແລະ Unix ມີຄ່າ salt (8 bytes) ເຂົ້າໄປດ້ວຍ ເຮັດໃຫ້ພາດສະເວິດຂອງສອງຄົນນີ້ມີຄ່າ hash ທີ່ບໍ່ຄືກັນ

Image does not exist: https://image.ibb.co/ij8KV5/salt2.png

• ເທິງເຄື່ອງ Linux ທີ່ທັນສະໄໝ : $1$ ກ່ອນຄ່າ SALT ໝາຍເຖິງໃຊ້ MD5 Hash Algorithm

ລະຫັດລັບ (Password) ຖືກເກັບໄວ້ແນວໃດ ໃນວິນໂດວ ແລະ ລີນຸກ?

Image does not exist: https://image.ibb.co/frx7Hk/password.png

• ລະຫັດລັບ ຂອງຜູ້ໃຊ້ງານຕ້ອງປົກປ້ອງການກະທຳດັ່ງນີ້:
– ການເປີດເຜີຍ ລະຫັດລັບ Unauthorized disclosure
– ການປ່ຽນແປງລະຫັດລັບ Unauthorized modification
– ການລົບລະຫັດລັບ Unauthorized removal
• ວິທີການເກັບທີ່ປ້ອງກັນການກະທຳ 3 ຢ່າງຂ້າງເທິງນັ້ນຄຶ : ເກັບສະເພາະ encrypted password ຫລື hashed password
– Windows ເກັບລະຫັດລັບໃນ Security Account Manager (SAM) ແລະ ໃນ Active Directory
– Linux ເກັບລະຫັດລັບໃນ /etc/shadow

Monday, June 26, 2017

Hack ເພື່ອຮຽນ ບໍ່ແມ່ນຮຽນເພື່ອ Hack – List Application ສຳລັບການຮຽນຮູ້ security

ແຫຼ່ງຮຽນຮູ້ Security ເປັນເລື່ອງທີ່ຫາໄດ້ຍາກໃນປະເທດ ທັງແຫຼ່ງເນື້ອຫາການຮຽນຮູ້ ແລະ ການຫາ lab ເພື່ອທົດສອບດ້ວຍເຊັ່ນກັນ ທີນີ້ກໍ່ເລີຍ list ເອົາ web application ທີ່ຖືກສ້າງໃຫ້ມີຊ່ອງໂຫວ່ເພື່ອໃຫ້ທົດສອບ ແລະຮຽນຮູ້ກ່ຽວກັບຊ່ອງໂຫວ່ທາງດ້ານ Web Application
1. OWASP WebGoat
WebGoat ເປັນ web application ທີ່ໃຫ້ມີຊ່ອງໂຫວ່ໂດຍອົງກອນ OWASP ເພື່ອສອນ ເພາະໃນນັ້ນຈະມີທັງຄຳອະທິບາຍ ແລະ ຄຳແນະນຳໃນການແກ້ໄຂຊ່ອງໂຫວ່ດັ່ງກ່າວ
2. DVWA
Damn Vulnerable Web Application (DVWA) ຖືກສ້າງເພື່ອຮຽນຮູ້ຊ່ອງໂຫວ່ຂອງ PHP ໂດຍຈະມີການແບ່ງລະດັບຄວາມຍາກຂອງຊ່ອງໂຫວ່ເປັນຫຼາຍລະດັບ
3. SQLi-Labs
เປັນ web application ທີ່ຖືກສ້າງມາເພື່ອໃຫ້ຮຽນຮູ້ ແລະ ທົດສອບເຈາະຊ່ອງໂຫວ່ SQL-Injection ໂດຍມີທັງ
- Error Based Injections (Union Select)
- String
- Intiger
- Error Based Injections (Double Injection Based)
- BLIND Injections: 1.Boolian Based 2.Time Based
- Update Query Injection.
- Insert Query Injections.
- Header Injections. 1.Referer based. 2.UserAgent based. 3.Cookie based.
- Second Order Injections
- Bypassing WAF
- Bypassing Blacklist filters Stripping comments Stripping OR & AND Stripping SPACES and COMMENTS Stripping UNION & SELECT
- Impedance mismatch

[Read more…]

Subscribe

  • RSS Atom

ອອນລາຍ: 1 | ມື້ນີ້: 1 | ວານນີ້: 15 | ທິດນີ້: 96 | ເດືອນນີ້: 875 | ປີນີ້: 11835 | ລວມ: 78938