inslash.com
Just another System security & Develop
Follow
Following
Trending
10 Best Practices for Better RESTful API (RESTful API Checklist)
10 Best Practices for Better RESTful API (RESTful API Checklist)
การกำหนดรูปแบบของ API นั้น จะทำให้ง่ายต่อการพัฒนาเมื่อมี developers หลายๆคน ทุกๆคนจะได้เขียนเป็น format เดียวกันเพื่อให้ง่ายต่อการจัดการ
Chen Ning-An (陳宁安)
Jan 28
Tips เล็กๆ สำหรับ PHP Secure coding
Tips เล็กๆ สำหรับ PHP Secure coding
วันนี้เรามี Tips เล็กๆ น้อยๆ สำหรับการพัฒนาภาษา PHP ให้มีความมั่นคงปลอดภัยมากยิ่งขึ้น (PHP Secure coding) แต่ก่อนอื่นเรามารู้จักภาษา PHP ก…
Chen Ning-An (陳宁安)
May 21, 2015
Golang ปัญหาภาษาไทยบน Linux
Golang ปัญหาภาษาไทยบน Linux
ปัญหาภาษาไทยบน Linux นั้น เกิดจากการที่ Linux ใช้ Character encode เป็น ISO-8859–11 ดังนั้นหากเราต้องการที่จะแสดงภาษาไทยให้อ่านได้นั้นจำเป…
Chen Ning-An (陳宁安)
Jan 26
อยากรู้ไหม?
อยากรู้ไหม?
สำหรับท่านที่เป็น Support มักจะมีปัญหากับการติดไวรัสคอมพิวเตอร์ที่มาจาก USB Flash Drive
Chen Ning-An (陳宁安)
Jun 15, 2015
Latest
GoLismero The Web Knife Open Source Security Tools
GoLismero The Web Knife Open Source Security Tools
GoLismero เป็น Open Source สำหรับทดสอบความมั่นคงปลอดภัยในระบบสารสนเทศ คุณอาจรู้จักเครื่องมืออื่นๆแล้ว เช่น OpenVas, Wfuzz, SQLMap, DNS…
Chen Ning-An (陳宁安)
May 4, 2015
Cross site scripting URL redirection in chrome with TinyURL
Cross site scripting URL redirection in chrome with TinyURL
ช่องโหว่ Cross site scripting URL redirection กับ TinyURL
Chen Ning-An (陳宁安)
May 6, 2015
HOW TO CREATE SECURE COOKIES
HOW TO CREATE SECURE COOKIES
Making your cookies and sessions secure is essential for any developer/programmer. Today at Codingsec we are going to go through what…
cookies are and how they relate to security. Within this article it will feature techniques such as limiting the cookie to certain domains, also paths within that domain. It will also demonstrate how to select what information to store, also protecting the cookie from cross site scripting exploits.
¶
การทำ cookies และ sessions ให้ปลอดภัยนั้นมีความจำเป็นสำหรับ developer/programmer ทางเว็บ codingsec จะกล่าวเกี่ยวกับการจัดการ cookies อย่างไรให้ปลอดภัย โดยในหัวข้อนี้จะแสดงเทคนิคในการจำกัด cookies…
Chen Ning-An (陳宁安)
May 6, 2015
NNETHOGS — MONITOR PER PROCESS NETWORK BANDWIDTH USAGE IN REAL TIME
NNETHOGS — MONITOR PER PROCESS NETWORK BANDWIDTH USAGE IN REAL TIME
ลินุกซ์มีโปรแกรมสำหรับ Monitor Network มากมาย เช่น iftop, netstat แต่ถ้าคุณกำลังมองหาโปรแกรมที่แสดงสถิติตามเวลาจริง NetHogs อาจเป็นคำตอบสำ…
Chen Ning-An (陳宁安)
May 10, 2015
ฟังก์ชันแฮช (Hash function)
ฟังก์ชันแฮช (Hash function)
ฟังก์ชันแฮช (Hash function) คือ วิธีการที่ทำให้ข้อมูลย่อลงแต่มีลักษณะจำเพาะของข้อมูลนั้น โดยอาจกระทำโดยการแบ่งข้อมูลออกเป็นส่วนๆ ผ่านวิธีก…
ารใดๆแล้วนำกลับมารวมกัน เรียกว่า ค่าแฮช (hash value)
¶
คุณสมบัติของฟังก์ชันแฮช (Hash function)
¶
ข้อมูลแต่ละตัวเมื่อผ่านฟังก์ชันแฮชแล้วจะต้องมีค่าไม่เท่ากัน มีลักษณะที่จำเพาะแต่ล่ะข้อมูล
¶
หาค่าแฮชจากข้อมูลควรทำได้ง่ายและรวดเร็ว
¶
เมื่อข้อมูลผ่านฟังก์ชันแฮชแล้วไม่ควรทำย้อนกลับได้
¶
การบวนการแฮชควรมีการกระจายตัวสูง ข้อมูลใดๆที่ผ่านฟังก์ชันแฮชควรมีขนาดเท่ากัน แต่ไม่เหมือนกัน
¶
ทำไมต้องมีฟังก์ชันแฮช?
Chen Ning-An (陳宁安)
May 13, 2015
Pssh — Linux Commands บน Linux Servers โดยใช้คำสั่งเดียว
Pssh — Linux Commands บน Linux Servers โดยใช้คำสั่งเดียว
ขั้นแรกเริ่มจากการติดตั้ง PSSH หรือ Parallel SSH บน Linux
On Fedora based Distributions
¶
1.ต้องติดตั้ง pip (python-pip) ก่อนดังนี้
¶
2.หากใช้ Fedora 21+ คุณต้องใช้ dnf command แทน yum
¶
3.เริ่มติดตั้ง PSSH ได้เลย
¶
On Debian Derivatives
¶
สำหรับ ubuntu ก็ต้องติดตั้ง pip ก่อนดังนี้
¶
ขั้นต่อไปเรามาเรียนรู้การใช้งาน
¶
1.สร้าง host file ด้วย
¶
2.จากนั้นเพิ่ม servers ที่เราต้องการดังนี้
¶
3.ใช้คำสั่งตามที่เราต้องการได้ดังนี้ โดย -h host-file คือไฟล์สำหรับเก็บรายการของ servers ที่เราต้องการเข้าถึง
¶
4.สำหรับการใช้งานอื่นๆ
Chen Ning-An (陳宁安)
Nov 5, 2015
DSH (Distributed Shell) to Run Linux Commands Across Multiple Machines
DSH (Distributed Shell) to Run Linux Commands Across Multiple Machines
จากเมื่อวานได้กล่าวถึง PSSH ที่ใช้ส่งคำสั่ง Linux ไปหลายๆเครื่องด้วยการใช้คำสั่งเดียวแล้ว
วันนี้เรามาดูเครื่องมืออีกหนึ่งตัวซึ่งมีความสามารถเดียวกัน นั่นคือ DSH นั่นเอง
¶
Install DSH (Distributed Shell) in Linux
¶
On Debian / Ubuntu
¶
On RHEL / CentOS / Fedora
¶
จากนั้นไปที่ config ไฟล์ของ DSH “/etc/dsh/dsh.conf” (สำหรับ Debian) and “/usr/local/etc/dsh.conf” (สำหรับ Red Hat) ค้นหาบรรทัดด้านล่างนี้
¶
ซึ่ง rsh จะใช้ protocol ที่ไม่เข้ารหัสลับ ดังนั้นให้เปลี่ยนเป็น
¶
จากนั้นให้ทำการเพิ่ม host โดยสามารถเพิ่มได้ทั้ง Hostname, IP Address, หรือ FQDN ต่อ 1 บรรทัดนะครับ ดังตัวอย่าง
¶
…
Chen Ning-An (陳宁安)
Nov 6, 2015
Linux / Unix: Find and Delete All Empty Directories & Files
Linux / Unix: Find and Delete All Empty Directories & Files
Method # 1: ค้นหาและลบด้วย find command บน Linux
ตัวอย่างด้านล่างเป็นการค้นหาและลบ directories ที่ว่างเปล่าโดยใช้ BSD or GNU find command:
¶
ค้นหาและลบไฟล์ที่ว่างเปล่า:
¶
ลบ directories ที่ว่างเปล่า
¶
จากตัวอย่าง จะเป็นการลบ directories จาก ~/Downloads/
¶
ลบไฟล์ที่ว่างเปล่า
¶
จากตัวอย่าง จะเป็นการลบไฟล์ที่ว่างเปล่าใน ~/Downloads/
¶
วิธีการนับไฟล์หรือ directories ที่ว่างเปล่า
¶
OPTION
¶
-empty : Only find empty files and make sure it is a regular file or a directory.
Chen Ning-An (陳宁安)
May 17, 2015
SQLassie: A database Firewall That Detects And Prevents SQL Injection Attacks At Runtime
SQLassie: A database Firewall That Detects And Prevents SQL Injection Attacks At Runtime
SQLassie : A database Firewall นั้นรองรับการทำงานกับ MySQL ซึ่ง ต้องตั้งค่าให้ SQLassie นั้นเชื่อมต่อกับระบบของ MySQL โดยที่ Port ต้องต่าง…
Chen Ning-An (陳宁安)
Jun 16, 2015
How To Use SSHFS to Mount Remote File Systems Over SSH
How To Use SSHFS to Mount Remote File Systems Over SSH
หากเบื่อกับการใช้งาน FTP, SFTP แล้วล่ะก็ เรามีตัวช่วยสำหรับงานนี้ครับ
นั่นคือการ Mount directory ในเครื่อง server เข้ามาที่เครื่องเราเลยครับ
¶
Installing SSHFS
¶
On Ubuntu/Debian
¶
On Mac OSX คุณสามารถติดตั้ง SHFS บน Mac OSX. โดยคุณสามารถดาวน์โหลด FUSE และ SSHFS ได้จาก osxfuse site
¶
Mounting the Remote File System
¶
ทำตามขั้นตอนดังต่อไปนี้ครับ
¶
สร้าง directory ที่ต้องการ Mount ด้วย
¶
จากนั้นคุณสามารถใช้ sshfs ในการ Mount ได้เลยครับ
¶
หากคุณใช้งาน key แทนการใช่รหัสผ่าน คุณสามารถทำตามขั้นตอนดังนี้
¶
Unmounting the Remote File System
¶
เมื่อคุณต้องการเล…
Chen Ning-An (陳宁安)
Jun 12, 2015
Automatically Recover From MySQL Crashes and Table Errors
Automatically Recover From MySQL Crashes and Table Errors
หากใครมีปัญหากับการที่ไฟดับ แล้วเมื่อเปิดเครื่องขึ้นมาพบว่า MySql Table Crashes เรามาดูวิธีแก้ปัญหานี้กันครับ
Chen Ning-An (陳宁安)
Jan 27
Personal VPN — OpenVPN in Docker on Ubuntu 14.04
Personal VPN — OpenVPN in Docker on Ubuntu 14.04
OpenVPN server in a Docker container complete with an EasyRSA PKI CA.
Chen Ning-An (陳宁安)
Jan 25
More stories →
About inslash dot com