1
KRIPTOLOGI dan PROTEKSI DATA
Asep Budiman K. MT
2
Ilmu dan Seni Keamanan Informasi Dimulai dari coba-coba. Merupakan sebuah seni. Mulai diformalkan dalam bentuk ilmu. Tidak bisa selamanya mengandalkan kepada coba-
coba saja. Harus menggabungkan keduanya. Catatan: Ilmu komputer (computer science) pun
muncul melalui jalur ini
3
Contoh Ilmu Security Kriptografi (cryptography)
Enkripsi & dekripsi: DES, AES, RSA, ECC Berbasis matematika
Protokol dan jaringan (network & protocols) SSL, SET
Sistem dan aplikasi (system & applications) Management, policy & procedures
4
Pengamanan data
Steganografimembuat seolah-olah pesan rahasia tidak ada atau tidak nampak
Kriptografimerupakan ilmu dan seni untuk menjaga pesanagar aman
5
sentuhan lembayung menyapa hariuntaian mutiara pagi menyejukan hatikuncup bunga mekar menebar aroma kehidupananginpun membawa sebentuk kata bumi kau telah membangunkanku dari tidur yang lelapusapan udaramu hangat menerpa wajahkumentari menghangatkan duniaindah …..potret suasana fajar yang menghibur hatibelaian kasih Tuhan sang pencipta alam fanamu
Ada Pesan apakah di text ini ?
6
Istilah-istilah
“Crypto” berarti “secret” (rahasia) “graphy” berarti “writing” (tulisan) para pelaku atau praktisi kriptografi disebut cryptographers
algoritma kriptografi disebut cipher pesan yang tersembunyi disebut ciphertext pesan dalam bentuk aslinya disebut plaintext
7
Istilah-istilah
enkripsi (encryption) :Proses yang dilakukan untuk mengamankan sebuah pesan
dekripsi (decryption) :untuk mengubah ciphertext menjadi plaintext
8
Tujuan kriptografi Confidentiality Integrity Availability Ketiga di atas sering disingkat menjadi CIA Ada tambahkan lain
Non-repudiation Authentication Access Control Accountability.
9
Confidentiality / Privacy
Kerahasiaan data. Data hanya boleh diakses oleh orang yang berwenang Data-data pribadi Data-data bisnis; daftar gaji, data nasabah Sangat sensitif dalam e-commerce dan healthcare
Serangan: penyadapan (teknis dengan sniffer / logger, man in the middle attack; non-teknis dengan social engineering)
Proteksi: enkripsi
10
Integrity
Informasi tidak boleh berubah (tampered, altered, modified) oleh pihak yang tidak berhak
Serangan Pengubahan data oleh orang yang tidak berhak, spoofing Virus yang mengubah berkas
Proteksi: Message Authentication Code (MAC), digital signature /
certificate, hash functions, logging
11
Availability
Informasi harus tersedia ketika dibutuhkan Serangan
Meniadakan layanan (Denial of Service / DoS attack) atau menghambat layanan (server dibuat lambat)
Proteksi Backup, redundancy, DRC, BCP, firewall
12
Non-repudiation
Tidak dapat menyangkal (telah melakukan transaksi) Menggunakan digital signature Logging
13
Authentication
Meyakinkan keaslian data, sumber data, orang yang mengakses data, server yang digunakan what you have (identity card) what you know (password, PIN) what you are (biometric identity)
Serangan: identitas palsu, terminal palsu, situs gadungan
14
Access Control
Mekanisme untuk mengatur siapa boleh melakukan apa Membutuhkan adanya klasifikasi data:
public, private, confidential, (top)secret Role-based access
15
Accountability
Dapat dipertanggung-jawabkan Melalui mekanisme logging dan audit Adanya kebijakan dan prosedur (policy & procedures)
16
Komponen kriptografi
17
Conventional cryptography Disebut juga secret-key or symmetric-key encryption, Satu kunci digunakan untuk enkripsi dan deskripsi. Contoh : Data Encryption Standard (DES)
18
DES: Data Encryption Standard
19
Tipe Enkripsi
20
Simetris vs Asimetris
Simetrisuntuk melakukan enkripsi dan deskripsi menggunakan kunci yang sama
Asimetrisuntuk melakukan enkripsi dan deskripsi menggunakan kunci yang berbeda
21
Conventional encryption
22
Contoh Conventional Encryption
Caesar’s Cipher Menggunakan kunci Caesar bernilai 3 Plain : ABCDEFGHIKLMNOPQRSTUVWXYZGeser 3 hurup keatas, sehingga menjadi : chiper : DEFGHIKLMNOPQRSTUVWXYZABCArtinya adalah :D=A, E = B, C = E dan seterusnyaContoh : enkripsi kata SUKABUMI, maka hasil dari enkripsi
adalah WYODEYQM
23
Public key cryptography
24
Public key cryptography Diperkenalkan oleh Diffie-Hellman Merupakan skema asymmetric Menggunakan sepasang kunci untuk enkripsi yaitu
public key Untuk dekripsi data menggunakan private atau
secret key public key = hanya bisa enkripsi public key + private key = bisa deskripsi private key = ?
25
Contoh Public key cryptography
Elgamal (named for its inventor, Taher Elgamal), RSA (named for its inventors, Ron Rivest, Adi Shamir, and
Leonard Adleman), Diffie-Hellman (named, you guessed it, for its inventors), DSA, the Digital Signature Algorithm (invented by David
Kravitz).
26
27
Enkripsi dengan PGP
28
Deskripsi dengan PGP
29
Digital signatures
30
Hash Function
31
Digital certificates3 hal utama pada digital certificate :• public key.• Certificate information. (“Identity” informasi tentang • satu atau lebihdigital signatures.
32
PGP Certificate
33
Algoritma Blowfish Enciphervoid Blowfish_encipher(blf_ctx *bc, unsigned long *xl, unsigned long *xr){ unsigned long Xl; unsigned long Xr; unsigned long temp; short i; Xl = *xl; Xr = *xr; for (i = 0; i < N; ++i) { Xl = Xl ^ bc->P[i]; Xr = F(bc, Xl) ^ Xr; temp = Xl; Xl = Xr; Xr = temp; } temp = Xl; Xl = Xr; Xr = temp; Xr = Xr ^ bc->P[N]; Xl = Xl ^ bc->P[N + 1]; *xl = Xl; *xr = Xr;}
34
Algoritma Blowfish dechipervoid Blowfish_decipher(blf_ctx *bc, unsigned long *xl, unsigned long *xr){ unsigned long Xl; unsigned long Xr; unsigned long temp; short i; Xl = *xl; Xr = *xr; for (i = N + 1; i > 1; --i) { Xl = Xl ^ bc->P[i]; Xr = F(bc, Xl) ^ Xr; /* Exchange Xl and Xr */ temp = Xl; Xl = Xr; Xr = temp; }
/* Exchange Xl and Xr */ temp = Xl; Xl = Xr; Xr = temp; Xr = Xr ^ bc->P[1]; Xl = Xl ^ bc->P[0]; *xl = Xl; *xr = Xr; }
35
Pembuatan private key
void blf_key (blf_ctx *c, unsigned char *k, int len){ InitializeBlowfish (c, k, len); }
36
Inisialisasi blowfishshort InitializeBlowfish(blf_ctx *bc, unsigned char key[], int keybytes){ short i; short j; short k; unsigned long data; unsigned long datal; unsigned long datar;/* initialise p & s-boxes without file read */for (i = 0; i < N+2; i++){ bc->P[i] = bfp[i]; } for (i = 0; i < 256; i++) { bc->S[0][i] = ks0[i];
bc->S[1][i] = ks1[i];bc->S[2][i] = ks2[i];bc->S[3][i] = ks3[i]; }
37
j = 0;for (i = 0; i < N + 2; ++i) { data = 0x00000000; for (k = 0; k < 4; ++k) {data = (data << 8) | key[j]; j = j + 1; if (j >= keybytes)
{ j = 0; } } bc->P[i] = bc->P[i] ^ data; } datal = 0x00000000; datar = 0x00000000; for (i = 0; i < N + 2; i += 2) { Blowfish_encipher(bc, &datal, &datar); bc->P[i] = datal; bc->P[i + 1] = datar; } for (i = 0; i < 4; ++i) { for (j = 0; j < 256; j += 2) { Blowfish_encipher(bc, &datal, &datar); bc->S[i][j] = datal; bc->S[i][j + 1] = datar; } } return 0;}
38
System UNIX ROT13
Sisi pengirimC = ROT13(M)
Sisi penerimaM = ROT13(ROT13(M))
39
ROT13 dalam bahasa perlWhile (<>) { #read a line into $ for ($i=0; $i < length($_) ; $i++) { $ch=substr($_,$i,1); if ((ord($ch)>=97) and (ord($ch)<=122)) { $newch = &rot13($ch); # rotate it printf (“%c”, $newch); } else { print $ch; }}}Sub rot13 { local ($ch) = @_; $asch = ord($ch) -97;
$rotasch= $asch + 13; $rotasch = $rotasch % 26; $rotasch = $rotasch + 97; return($rotasch);}
40
protokol komunikasi
Servis di Internet : protokol TCP atau UDP. Setiap servis dijalankan dengan menggunakan port
yang berbeda, misalnya:
SMTP, untuk mengirim dan menerima e-mail, TCP, port 25 DNS, untuk domain, UDP dan TCP, port 53 HTTP, web server, TCP, port 80 POP3, untuk mengambil e-mail, TCP, port 110
41
Protokol SSLClient Hello / Connection RequestDaftar algoritma / cipher suite
Pemilihan cipher suite
Sertifikat Digital Server
Encrypted secret / key / nonce
Decrypted secret
Sertifikat Digital Client
Encrypted secret / key / nonce
Decrypted secret
Kunci simteris disepakati
Client Server
1
2
3
4
Transfer data dengan enkripsi kunci simetris
42
System Security: Secure Email
From: BudiSubject: Kiriman
KirimandatangSeninpagi
af005c0810eeca2d5
From: BudiSubject: Kiriman
KirimandatangSeninpagi
hash ohx76@#
Enkripsi (dg kunci privat pengirim)ohx76@#
Keduanya disatukan dan dikirimkan
Isi email tidak dirahasiakan.Diinginkan terjaganya integritasdan non-repudiation
43
Mengapa keamanan harus dimonitor ?
Ditemukannya lubang keamanan (security hole) yang baru.
Kesalahan konfigurasi. Penambahan perangkat baru
44
Sumber lubang keamanan Salah Disain Implementasi kurang baik Salah konfigurasi Salah menggunakan program atau sistem
45
Topologi Lubang Keamanan
www.bank.co.id
Internet
Web SiteUsers
ISP
Networksniffed, attacked
Networksniffed,attacked
Networksniffed,attacked,flooded
Trojan horse - Applications (database,Web server) hacked
- OS hacked
1. System (OS)2. Network3. Applications + db
Holes
Userid, Password,PIN, credit card #
46
Penguji keamanan sistem sistem yang berbasis UNIX, tools :
Cops Tripwire Satan/Saint SBScan: localhost security scanner
sistem yang berbasis Windows NT: Ballista yang dapat diperoleh dari:
<http://www.secnet.com>
47
Penggunaan sistem pemantau jaringan
Contoh program network monitoring / management : Etherboy (Windows), Etherman (Unix) HP Openview (Windows) Packetboy (Windows), Packetman (Unix) SNMP Collector (Windows) Webboy (Windows)
48
Teknologi Informasi Teknologi yang terkait dengan pembuatan, pengolahan, distribusi,
penyimpanan dari informasi Menghasilkan produk dan layanan yang sudah kita gunakan sehari-hari
sebagai “manusia moderen” Mesin ATM di bank Telepon, handphone, SMS Games, PlayStation, on-line games P2P applications
49
Mengamankan SistemInformasi
Melalui layer “transport”, dapat digunakan “Secure Socket Layer” (SSL) untuk server web.
Secara fisik sistem diamankan dengan “firewall” yang memisahkan sistem anda dengan Internet.
Teknik enkripsi dapat dilakukan di tingkat aplikasi
50
The Objective
Open source searchwhoisWeb interce to whoisARIN whoisDNS zone transfer
Footprinting
ANATOMY OF A HACKThe Methodology The Techniques The Tools
USENet, search engines, EdgarAny UNIX clienthttp://www.networksolutions.com/whoishttp://www.arin.net/whoisdig, nslookup ls -d, Sam Spade
Target address range, name space acquisition, and information gathering are essential to a surgical attack. The key here is not to miss any details.
Bulk target assessment and identification of listening services focuses the attacker's attention on the most promising avenues of entry
Scanning
Denial of Service
Creating back doors
Covering tracksCreating
back doors
Pilfering
Escalating privilege
Gaining access
Enumeration
List user accountsList file sharesIdentify applications
null sessions, DumpACL, sid2user, OnSite Adminshowmount, NAT, Legionbanner grabbing with telnet or netcat, rpcinfo
Ping sweepTCP/UDP portOS Detection
fping, icmpenum WS_Ping ProPacknmap, SuperScan, fscanNmap, queso, siphon
Password eavesdroppingFile share brute forcingPassword file grabBuffer overflows
tcpdump, L0phtcrack readsmbNAT, legiontftp, pwdump2 (NT)ttdb, bind, IIS .HTR/ISM.DLL
Password crackingKnown exploits
john, L0phtcracklc_messages, getadmin, sechole
Evaluate trustsSearch for cleartext passwords
rhosts, LSA Secretsuser data, configuration files, Registry
Clear logsHide tools
zap Event Log GUI,rootkits, file streaming
SYN floodICMP techniquesIdentical src/dst SYN requestsOverlapping fragment/offset bugsOut of bounds TCP options (OOB)DDoS
synk4ping of death, smurfland, latierrateardrop, bonk, newtearsupernuke.exetrinoo/TFN/stcheldraht
Create rouge user accountsSchedule batch jobsInfect startup filesPlant remotecontrol servicesInstall monitoring mechanismsReplace apps with Trojans
members of wheel, Administratorscron, ATrc, Startup folder, Registry keysnetcat, remote.exe, VNC, BO2Kkeystroke loggers, add acct. to secadmin mail aliaseslogin, fpnwclnt.dll
More intrusive probing now begins as attackers begin identifying valid user accounts or poorly protected resource shares.
Enough data has been gathered at this point to make an informed attempt to access the target
If only user-level access was obtained in the last step, the attacker will now seek to gain complete control of the system
The information-gathering proccess begins again to identify
mechanisms to gain access to trusted systems.
Once total ownership of the target is sesured, hiding this fact
from system administrators becomes paramount, lest they
quickly end the romp.
Trap doors will be laid in various parts of the system to ensure
that priveleged access is easily regained at the whim of the
intruder
If an attacker is unsuccessful in gaining access, they may use
readily available exploit code to disable a target as a last resort.
source: hacking exposed
51
Penggunaan Enkripsi untuk meningkatkanKeamanan
Contoh servis yang menggunakan plain text antara lain:
akses jarak jauh dengan menggunakan telnet dan rlogin transfer file dengan menggunakan FTP akses email melalui POP3 dan IMAP4 pengiriman email melalui SMTP akses web melalui HTTP
52
Membatasi akses melalui Kontrol Akses
membatasi domain atau nomor IP yang dapat mengakses;
menggunakan pasangan userid & password; mengenkripsi data sehingga hanya dapat dibuka
(dekripsi) oleh orang yang memiliki kunci pembuka.
53
Pelaku di bidang Security Information bandit
Sekarang masih dipotretkan sebagai jagoan Akan tetapi akan berkurang the disappearance act of information bandits
Information security professionals Masih kurang Lebih menyenangkan
Keduanya menggunakan tools yang sama Perbedaannya sangat tipis: itikad & pandangan Jangan bercita-cita menjadi bandit!
54
Penutup
Jadilah seorang security professional dan bukan menjadi seorang bandit
Jadilah Polisi cyber dan menjadi penjahat cyber.
55
Sumber Bacaan1. Richard H. Baker, “Network Security: how to plan for it and achieve it,”McGraw-Hill
International, 1995.2. Steven M. Bellovin, “Security Problems in TCP/IP Protocol Suite,”Computer
Communication Review, Vol. 19, No. 2, pp. 32-48, 1989.3. Tim Berners-Lee, “Weaving the Web: the past, present and future of the world
wide web by its inventor,” Texere, 2000.4. Dan Brown, “The Da Vinci Code,” Doubleday, 2003.5. Lawrie Brown, “Lecture Notes for Use with Network and Internetwork Security by
William Stallings,” on-line document. <http://www1.shore.net/~ws/Security-Notes/index.html>
6. Silvana Castano, Mariagrazia Fugini, Giancarlo Martella, dan Pierangela Samarati, “Database Security,” Addison-Wesley, 1995.
7. Whitfield Diffie, and Martin E. Hellman, “New Directions in Cryptography,” IEEE Transactions on Information Theory, IT-22, 6, 1976, pp. 644-654.
8. Bruce Schneier, “Applied Cryptography: Protocols, Algorithms, and Source Code in C,” second edition, John Wiley & Sons, Inc., 1996.
Top Related