SlideShare uma empresa Scribd logo
1 de 49
Baixar para ler offline
Group 8
• นายเฉลิมเกียรติชนะชาญ
• นายธนวิชญ์โทราช
• นสอัญธิกาหนองบัว
Assignment 2
Database Security
Compare With File-System Security (Permission)
• Standard Permission เป็น Permission ที่ได้นำเอำ Special
Permission มำจัดกลุ่มให้จำนวนรำยกำรลดลงเหลือเพียง4 กลุ่มสำหรับ
แฟ้ มข้อมูลได้แก่
Database Security
Compare With File-System Security (Permission)
• Read(RX) ประกอบด้วย Special Access 2 รำยกำรคือ Read และ Execute
ซึ่งหมำยถึงสำมำรถอ่ำนข้อมูล และเรียกโปรแกรมมำทำงำน (ถ้ำแฟ้ มนั้นเป็นโปรแกรมรวม)
• Change(RWXD) ใช้สำหรับอ่ำน/แก้ไข/ลบข้อมูล
• Full Control(RWXDPO) สำมำรถทำรำยกำรได้ทั้งหมด
• No Access() ไม่สำมำรถเรียกดูข้อมูลได้ ถึงแม้ว่ำจะอยู่ในกลุ่มที่กำหนดให้เรียกดูได้ (หมำยถึง
No Access จะ Overwrite ควำมสำมำรถอื่น) รำยกำรสำหรับโฟลเดอร์ ได้แก่ (รูปแบบกำร
แสดงเป็ น xxxx (dir-permission) (file-permission) วงเล็บแรกเป็นกำรกำหนดสิทธิ
สำหรับโฟลเดอร์นั้น ส่วนวงเล็บหลังเป็นกำรกำหนดสิทธิของแฟ้ มข้อมูลในโฟลเดอร์นั้น
Specifications of
Computer
Simple Database For
A1 User
TablesName Users Passenger Airport Staff Admins
Airport R CRU Full Control (CRUD)
Airplane_Type - CRU Full Control (CRUD)
Airplane - CRU Full Control (CRUD)
Leg_Instance - CRU Full Control (CRUD)
Seat R CRU Full Control (CRUD)
Flight_Leg R CRU Full Control (CRUD)
Flight R CRU Full Control (CRUD)
Fare R CRU Full Control (CRUD)
Can_Land - CRU Full Control (CRUD)
Discretionary
Access Control
R: Read, Retrieve C: Create U: Update, Modify D: Delete, Destroy
Create User
•Mysql
Create User
•Mysql
คำสั่งที่ใช้
ผลลัพธ์ที่ได้
•Mysql
Passenger
คำสั่งที่ใช้
•Mysql
สิทธิ์ที่ user Passenger สำมำรถเข้ำถึงได้
•Mysql
Airport Staff
คำสั่งที่ใช้
ผลลัพธ์ที่ได้
•Mysql
Admins
คำสั่งที่ใช้
ผลลัพธ์ที่ได้
•PostgreSQL
Create user
•PostgreSQL
คำสั่งที่ใช้
ผลที่ได้
•PostgreSQL
Passenger
คำสั่งที่ใช้
•PostgreSQL
Airport Staff
คำสั่งที่ใช้
•PostgreSQL
Admins
คำสั่งที่ใช้
•PostgreSQL
ผลลัพธ์ที่ได้
•SQLite3
คำสั่งที่ใช้
สร้ำง user ubuntu ขึ้นมำ 2 user โดยที่ admins จะ ทำได้ทุกอย่ำง เช่นกำรอ่ำนข้อมูล
•SQLite3
Passenger จะอ่ำนได้อย่ำงเดียว ถ้ำ insert จะขึ้นดังรูป
admin insert+select ได้
Database Log Files
Database Log Files
• ตำแหน่งข อง Log files
ใน Ubuntu : /var/log/postgresql/
การดู Database Log Files
• สำมำรถกดดูได้ด้วยคำสั่ง cat , tail , head , nano , gedit
ตัวอย่ำง tail postgresql-9.3-main.log
ตัวอย่ำง nano postgresql-9.3-main.log
Backup/Restore
Backup /Restore Database Files
• Backup ใช้คำสั่ง pg_dump –Fc Database Name > Backup_Name.bak
หรือ pg_dump –Ft Database Name > Backup_Name.tar
• Restore ใช้คำสั่ง pg_restore –Fc Database Name > Backup_
Name.bak หรือ pg_resotre –Ft Database Name > Backup_Name.tar
PostgreSQLBackup /Restore
ไฟล์จะอยู่ใน /var/lib/postgreSQL
PostgreSQLBackup /Restore
สร้ำงdatabase ใหม่
คำสั่ง restore
เสร็จแล้วจะปรำกฏดังรูป
PostgreSQLBackup /Restore
SQLite3Backup /Restore
คำสั่ง backup
ไฟล์จะอยู่บน desktop
SQLite3Backup /Restore
คำสั่ง restore
mySQLBackup /Restore
คำสั่ง backup
คำสั่ง restore
mySQLBackup /Restore
Possible unethical uses
of your group database?
•Our Database
about airline reservations system.
 การเปิดเผยข้อมูลลูกค้า (ผู้โดยสาร) เป็นการไม่สมควร
เนื่องจากถือเป็นการละเมิดสิทธิส่วนบุคคล ซึ่งผิดต่อกฎหมาย
และอาจก่อให้เกิดความเสียหายได้
 การเปิดเผยข้อมูลเที่ยวบิน เนื่องจากอาจก่อให้เกิดความเสียหาย
ต่อสายการบิน ทั้งด้านความปลอดภัย และความน่าเชื่อถือ อาจเป็น
เหตุทาให้เกิดการก่ออาชญากรรมบนเครื่องบินได้ง่าย เพราะทราบ
ข้อมูลทั้งหมดแล้ว
SQL Injection
• SQL INJECTION
SQL injection is a technique where malicious users can inject SQL commands into an SQL
statement, via web page input.
เป็นเทคนิคที่ผู้ประสงค์ร้ายสามารถบีบคาสั่งของ SQL เข้าไปในข้อความ SQL ผ่านทางหน้าเวปเพจ
Injected SQL commands can alter SQL statement and compromise the security of a web
application.
คาสั่ง SQL ที่ถูกบีบอัด สามารถปรับเปลี่ยนคาสั่ง SQL และยอมรับความปลอดภัยของเวป
แอปพิเคชั่น
• Example of SQL Injection
ต้องกำรค้นหำข้อมูลสำยกำรบิน DMK
คำสั่ง SELECT * FROM Airport WHERE Airport_code = ‘DMK’;
• Example of SQL Injection
และถ้ำเพิ่ม or 1=1
คำสั่ง SELECT * FROM Airport WHERE Airport_code = ‘DMK’ or 1=1;
• How to test SQL Injection
ตรวจสอบเพื่อที่ต้องการหาว่าการค้นหาหรือดึงข้อมูล (Query) จากดาต้าเบส นั่นถูกต้องตามที่
ต้องการหรือไม่
ส่วนที่ต้องการตรวจสอบก็คือส่วนที่มีปฏิสัมพันธ์กับข้อมูลโดยตรง
เช่น ส่วนของล็อกอินของผู้ใช้(Authentication) , ส่วนค้นหาข้อมูล(Search Engines) , ส่วนที่กรอก
จานวนสินค้า หรือราคาต่างๆ (E-commerce)
• Standard SQL Injection Testing
1. SQL Injection based on 1 = 1 is always TRUE
2. SQL Injection based on “=“ is alsways TRUE
3. SQL Injection based on batched SQL statements
• SQL Injection Based on ""="" is Always True
SELECT * FROM Airport WHERE Airport_code = ‘DMK’ or 1=1;
• SQL Injection based on “=“ is alsways TRUE
• SQL Injection based on batched SQL statements
Assignment 2 of Database (Database Security)

Mais conteúdo relacionado

Destaque

Eer >r.model
Eer >r.modelEer >r.model
Eer >r.model
lavya3
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
Slideshare
 

Destaque (20)

Assignment 1 of Database (MySQL & Sqlite3)
Assignment 1 of Database (MySQL & Sqlite3) Assignment 1 of Database (MySQL & Sqlite3)
Assignment 1 of Database (MySQL & Sqlite3)
 
Access Database Library Assignment
Access Database Library AssignmentAccess Database Library Assignment
Access Database Library Assignment
 
Database Programming Project Assignment
Database Programming Project AssignmentDatabase Programming Project Assignment
Database Programming Project Assignment
 
Er diagram
Er diagramEr diagram
Er diagram
 
Vanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne Data Summary: Shadow IT - BDMsVanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne Data Summary: Shadow IT - BDMs
 
00137
0013700137
00137
 
Mapping
MappingMapping
Mapping
 
02er
02er02er
02er
 
Special lecture er diagram
Special lecture er diagramSpecial lecture er diagram
Special lecture er diagram
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
ICT Students Presentations
ICT Students PresentationsICT Students Presentations
ICT Students Presentations
 
Unilever
UnileverUnilever
Unilever
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.model
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams Simplified
 
Mapping ER and EER Model
Mapping ER and EER ModelMapping ER and EER Model
Mapping ER and EER Model
 
Entity relationship diagram
Entity relationship diagramEntity relationship diagram
Entity relationship diagram
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
enhanced er diagram
enhanced er diagramenhanced er diagram
enhanced er diagram
 
Enhanced ER(database)
Enhanced ER(database)Enhanced ER(database)
Enhanced ER(database)
 
Entity Relationship Diagram Templates by Creately
Entity Relationship Diagram Templates by CreatelyEntity Relationship Diagram Templates by Creately
Entity Relationship Diagram Templates by Creately
 

Semelhante a Assignment 2 of Database (Database Security)

Database basic new
Database basic newDatabase basic new
Database basic new
Qoo Kratai
 
Basic Linux
Basic LinuxBasic Linux
Basic Linux
minafaw2
 
Database basic new
Database basic newDatabase basic new
Database basic new
Qoo Kratai
 
Database basic new
Database basic newDatabase basic new
Database basic new
Qoo Kratai
 
คู่มือการติดตั้ง Cent os
คู่มือการติดตั้ง  Cent osคู่มือการติดตั้ง  Cent os
คู่มือการติดตั้ง Cent os
Pacharin Ngowpradit
 

Semelhante a Assignment 2 of Database (Database Security) (20)

Database basic new
Database basic newDatabase basic new
Database basic new
 
Ch11th
Ch11thCh11th
Ch11th
 
Com element
Com elementCom element
Com element
 
ส่วนประกอบของคอมพิวเตอร์
ส่วนประกอบของคอมพิวเตอร์ส่วนประกอบของคอมพิวเตอร์
ส่วนประกอบของคอมพิวเตอร์
 
Basic linux
Basic linuxBasic linux
Basic linux
 
Basic Linux
Basic LinuxBasic Linux
Basic Linux
 
Database basic new
Database basic newDatabase basic new
Database basic new
 
บทที่ 1
บทที่ 1บทที่ 1
บทที่ 1
 
Database basic new
Database basic newDatabase basic new
Database basic new
 
Hotspotubuntu8
Hotspotubuntu8Hotspotubuntu8
Hotspotubuntu8
 
NETWORK SERVICEOPENSSH + NTP + SQUID
NETWORK SERVICEOPENSSH + NTP + SQUIDNETWORK SERVICEOPENSSH + NTP + SQUID
NETWORK SERVICEOPENSSH + NTP + SQUID
 
เครื่องมือและเทคนิคการวิเคระห์ในกลุ่มซอฟต์แวร์วิเคราะห์ข้อมูลกิจกรรมแม่ข่ายเว็บ
เครื่องมือและเทคนิคการวิเคระห์ในกลุ่มซอฟต์แวร์วิเคราะห์ข้อมูลกิจกรรมแม่ข่ายเว็บเครื่องมือและเทคนิคการวิเคระห์ในกลุ่มซอฟต์แวร์วิเคราะห์ข้อมูลกิจกรรมแม่ข่ายเว็บ
เครื่องมือและเทคนิคการวิเคระห์ในกลุ่มซอฟต์แวร์วิเคราะห์ข้อมูลกิจกรรมแม่ข่ายเว็บ
 
คู่มือการติดตั้ง Cent os
คู่มือการติดตั้ง  Cent osคู่มือการติดตั้ง  Cent os
คู่มือการติดตั้ง Cent os
 
Portable Moodle : Moodle & Server2Go
Portable Moodle  : Moodle & Server2GoPortable Moodle  : Moodle & Server2Go
Portable Moodle : Moodle & Server2Go
 
Cent OS-book
Cent OS-bookCent OS-book
Cent OS-book
 
องค์ประกอบของระบบปฏิบัติการ
องค์ประกอบของระบบปฏิบัติการองค์ประกอบของระบบปฏิบัติการ
องค์ประกอบของระบบปฏิบัติการ
 
องค์ประกอบของระบบปฏิบัติการ
องค์ประกอบของระบบปฏิบัติการองค์ประกอบของระบบปฏิบัติการ
องค์ประกอบของระบบปฏิบัติการ
 
องค์ประกอบของระบบปฏิบัติการ
องค์ประกอบของระบบปฏิบัติการองค์ประกอบของระบบปฏิบัติการ
องค์ประกอบของระบบปฏิบัติการ
 
Coovaubuntu904
Coovaubuntu904Coovaubuntu904
Coovaubuntu904
 
การจัดการความปลอดภัยและความเป็นส่วนตัวของข้อมูลผู้ป่วย
การจัดการความปลอดภัยและความเป็นส่วนตัวของข้อมูลผู้ป่วยการจัดการความปลอดภัยและความเป็นส่วนตัวของข้อมูลผู้ป่วย
การจัดการความปลอดภัยและความเป็นส่วนตัวของข้อมูลผู้ป่วย
 

Mais de Aey Unthika

Assignmet1:Start by finding web services using SOAP and WSDL on the Internet/...
Assignmet1:Start by finding web services using SOAP and WSDL on the Internet/...Assignmet1:Start by finding web services using SOAP and WSDL on the Internet/...
Assignmet1:Start by finding web services using SOAP and WSDL on the Internet/...
Aey Unthika
 
To try use XSL for display group XML file movies
To try use XSL for display group XML file moviesTo try use XSL for display group XML file movies
To try use XSL for display group XML file movies
Aey Unthika
 
Try to Use DOM and SAX API (python)
Try to Use DOM and SAX API (python)Try to Use DOM and SAX API (python)
Try to Use DOM and SAX API (python)
Aey Unthika
 

Mais de Aey Unthika (8)

Assignmet 2 selectedtopic Topic in Computer Engineer
Assignmet 2 selectedtopic Topic in Computer EngineerAssignmet 2 selectedtopic Topic in Computer Engineer
Assignmet 2 selectedtopic Topic in Computer Engineer
 
Assignmet1 selectedtopic Topic in Computer Engineer
Assignmet1 selectedtopic Topic in Computer EngineerAssignmet1 selectedtopic Topic in Computer Engineer
Assignmet1 selectedtopic Topic in Computer Engineer
 
Assignmet1:Start by finding web services using SOAP and WSDL on the Internet/...
Assignmet1:Start by finding web services using SOAP and WSDL on the Internet/...Assignmet1:Start by finding web services using SOAP and WSDL on the Internet/...
Assignmet1:Start by finding web services using SOAP and WSDL on the Internet/...
 
To try use XSL for display group XML file movies
To try use XSL for display group XML file moviesTo try use XSL for display group XML file movies
To try use XSL for display group XML file movies
 
To try and create DTD and XML Schema
To try and create DTD and XML SchemaTo try and create DTD and XML Schema
To try and create DTD and XML Schema
 
Try to Use DOM and SAX API (python)
Try to Use DOM and SAX API (python)Try to Use DOM and SAX API (python)
Try to Use DOM and SAX API (python)
 
Xml parser week2
Xml parser week2Xml parser week2
Xml parser week2
 
Introduction to XML.
Introduction to XML.Introduction to XML.
Introduction to XML.
 

Assignment 2 of Database (Database Security)