Kriptologi-Proteksi-Data-PPT-2007

Download Report

Transcript Kriptologi-Proteksi-Data-PPT-2007

KRIPTOLOGI dan
PROTEKSI DATA
Asep Budiman K. MT
1
Ilmu dan Seni Keamanan Informasi




Dimulai dari coba-coba. Merupakan sebuah seni.
Mulai diformalkan dalam bentuk ilmu.
Tidak bisa selamanya mengandalkan kepada cobacoba saja. Harus menggabungkan keduanya.
Catatan: Ilmu komputer (computer science) pun
muncul melalui jalur ini
2
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
3
Pengamanan data

Steganografi
membuat seolah-olah pesan rahasia tidak ada atau
tidak nampak

Kriptografi
merupakan ilmu dan seni untuk menjaga pesan
agar aman
4
Ada Pesan apakah di text ini ?
sentuhan lembayung menyapa hari
untaian mutiara pagi menyejukan hati
kuncup bunga mekar menebar aroma kehidupan
anginpun membawa sebentuk kata
bumi kau telah membangunkanku dari tidur yang lelap
usapan udaramu hangat menerpa wajahku
mentari menghangatkan dunia
indah …..potret suasana fajar yang menghibur hati
belaian kasih Tuhan sang pencipta alam fanamu
5
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

6
Istilah-istilah
enkripsi (encryption) :Proses yang dilakukan
untuk mengamankan sebuah pesan
 dekripsi (decryption) :untuk mengubah
ciphertext menjadi plaintext

7
Tujuan kriptografi





Confidentiality
Integrity
Availability
Ketiga di atas sering disingkat menjadi CIA
Ada tambahkan lain
 Non-repudiation
 Authentication
 Access Control
 Accountability.
8
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; nonteknis dengan social engineering)
Proteksi: enkripsi
9
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
10
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
11
Non-repudiation

Tidak dapat menyangkal (telah melakukan transaksi)
 Menggunakan digital signature
 Logging
12
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
13
Access Control

Mekanisme untuk mengatur siapa boleh melakukan apa
 Membutuhkan adanya klasifikasi data:
public, private, confidential, (top)secret
 Role-based access
14
Accountability



Dapat dipertanggung-jawabkan
Melalui mekanisme logging dan audit
Adanya kebijakan dan prosedur (policy & procedures)
15
Komponen kriptografi
16
Conventional cryptography



Disebut juga secret-key or symmetric-key encryption,
Satu kunci digunakan untuk enkripsi dan deskripsi.
Contoh : Data Encryption Standard (DES)
17
DES: Data Encryption Standard
18
Tipe Enkripsi
19
Simetris vs Asimetris


Simetris
untuk melakukan enkripsi dan deskripsi
menggunakan kunci yang sama
Asimetris
untuk melakukan enkripsi dan deskripsi
menggunakan kunci yang berbeda
20
Conventional encryption
21
Contoh Conventional Encryption

Caesar’s Cipher
Menggunakan kunci Caesar bernilai 3
 Plain : ABCDEFGHIKLMNOPQRSTUVWXYZ
Geser 3 hurup keatas, sehingga menjadi :
chiper : DEFGHIKLMNOPQRSTUVWXYZABC
Artinya adalah :
D=A, E = B, C = E dan seterusnya
Contoh : enkripsi kata SUKABUMI, maka hasil dari enkripsi
adalah WYODEYQM

22
Public key cryptography
23
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 = ?
24
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).
25
26
Enkripsi dengan PGP
27
Deskripsi dengan PGP
28
Digital signatures
29
Hash Function
30
Digital certificates
3 hal utama pada digital
certificate :
• public key.
• Certificate information.
(“Identity” informasi tentang
• satu atau lebihdigital
signatures.
31
PGP Certificate
32
Algoritma Blowfish Encipher
void 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;
}
33
Algoritma Blowfish dechiper
void 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; }
34
Pembuatan private key
void blf_key (blf_ctx *c, unsigned
char *k, int len)
{
InitializeBlowfish (c, k, len); }
35
Inisialisasi blowfish
short 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]; }
36
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;}
37
System UNIX  ROT13
Sisi pengirim
C = ROT13(M)
 Sisi penerima
M = ROT13(ROT13(M))

38
ROT13 dalam bahasa perl
While (<>) {
#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);
}
39
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
40
Protokol SSL
1
Client Hello / Connection Request
Daftar algoritma / cipher suite
Pemilihan cipher suite
2
Sertifikat Digital Server
Encrypted secret / key / nonce
Client
Decrypted secret
3
Server
Sertifikat Digital Client
Encrypted secret / key / nonce
Decrypted secret
4
Kunci simteris disepakati
Transfer data dengan enkripsi kunci simetris
41
System Security: Secure Email
Isi email tidak dirahasiakan.
Diinginkan terjaganya integritas
dan non-repudiation
Keduanya disatukan dan dikirimkan
From: Budi
Subject: Kiriman
From: Budi
Subject: Kiriman
Kiriman
datang
Senin
pagi
Kiriman
datang
Senin
pagi
hash
af005c0810eeca2d5
ohx76@#
Enkripsi (dg kunci privat pengirim)
ohx76@#
42
Mengapa keamanan harus dimonitor ?



Ditemukannya lubang keamanan (security hole)
yang baru.
Kesalahan konfigurasi.
Penambahan perangkat baru
43
Sumber lubang keamanan
Salah Disain
 Implementasi kurang baik
 Salah konfigurasi
 Salah menggunakan program atau sistem

44
Topologi Lubang Keamanan
Network
sniffed,
attacked
ISP
Holes
Internet
Network
sniffed, attacked
Users
Network
sniffed,
attacked,
flooded
1.
2.
3.
System (OS)
Network
Applications + db
Web Site
Trojan horse
Userid, Password,
PIN, credit card #
www.bank.co.id
- Applications
(database,
Web server)
hacked
-OS hacked
45
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>
46
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)
47
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
48
Mengamankan Sistem
Informasi



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
49
ANATOMY OF A HACK
The Objective
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
The Methodology
Footprinting
Scanning
More intrusive probing now
begins as attackers begin
identifying valid user accounts or
poorly protected resource
shares.
Enumeration
Enough data has been gathered
at this point to make an informed
attempt to access the target
Gaining access
If only user-level access was
obtained in the last step, the
attacker will now seek to gain
complete control of the system
Escalating
privilege
The information-gathering
proccess begins again to identify
mechanisms to gain access to
trusted systems.
Pilfering
Once total ownership of the
target is sesured, hiding this fact
from system administrators
becomes paramount, lest they
quickly end the romp.
Covering
tracksCreating
back doors
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
Creating back
doors
If an attacker is unsuccessful in
gaining access, they may use
readily available exploit code to
disable a target as a last resort.
Denial of Service
The Techniques
source: hacking exposed
The Tools
Open source search
whois
Web interce to whois
ARIN whois
DNS zone transfer
USENet, search engines, Edgar
Any UNIX client
http://www.networksolutions.com/whois
http://www.arin.net/whois
dig, nslookup ls -d, Sam Spade
Ping sweep
TCP/UDP port
OS Detection
fping, icmpenum WS_Ping ProPack
nmap, SuperScan, fscan
Nmap, queso, siphon
List user accounts
List file shares
Identify applications
null sessions, DumpACL, sid2user,
OnSite Admin
showmount, NAT, Legion
banner grabbing with telnet or netcat,
rpcinfo
Password eavesdropping
File share brute forcing
Password file grab
Buffer overflows
tcpdump, L0phtcrack readsmb
NAT, legion
tftp, pwdump2 (NT)
ttdb, bind, IIS .HTR/ISM.DLL
Password cracking
Known exploits
john, L0phtcrack
lc_messages, getadmin, sechole
Evaluate trusts
Search for cleartext passwords
rhosts, LSA Secrets
user data, configuration files, Registry
Clear logs
Hide tools
zap Event Log GUI,
rootkits, file streaming
Create rouge user accounts
Schedule batch jobs
Infect startup files
Plant remotecontrol services
Install monitoring mechanisms
Replace apps with Trojans
members of wheel, Administrators
cron, AT
rc, Startup folder, Registry keys
netcat, remote.exe, VNC, BO2K
keystroke loggers, add acct. to secadmin
mail aliases
login, fpnwclnt.dll
SYN flood
ICMP techniques
Identical src/dst SYN requests
Overlapping fragment/offset
bugs
Out of bounds TCP options
(OOB)
DDoS
synk4
ping of death, smurf
land, latierra
teardrop, bonk, newtear
supernuke.exe
trinoo/TFN/stcheldraht
50
Penggunaan Enkripsi untuk meningkatkan
Keamanan
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
51
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.
52
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!
53
Penutup


Jadilah seorang security professional dan bukan menjadi
seorang bandit
Jadilah Polisi cyber dan menjadi penjahat cyber.
54
Sumber Bacaan
1.
2.
3.
4.
5.
6.
7.
8.
Richard H. Baker, “Network Security: how to plan for it and achieve it,”McGraw-Hill
International, 1995.
Steven M. Bellovin, “Security Problems in TCP/IP Protocol Suite,”Computer
Communication Review, Vol. 19, No. 2, pp. 32-48, 1989.
Tim Berners-Lee, “Weaving the Web: the past, present and future of the world
wide web by its inventor,” Texere, 2000.
Dan Brown, “The Da Vinci Code,” Doubleday, 2003.
Lawrie Brown, “Lecture Notes for Use with Network and Internetwork Security by
William Stallings,” on-line document. <http://www1.shore.net/~ws/SecurityNotes/index.html>
Silvana Castano, Mariagrazia Fugini, Giancarlo Martella, dan Pierangela
Samarati, “Database Security,” Addison-Wesley, 1995.
Whitfield Diffie, and Martin E. Hellman, “New Directions in Cryptography,” IEEE
Transactions on Information Theory, IT-22, 6, 1976, pp. 644-654.
Bruce Schneier, “Applied Cryptography: Protocols, Algorithms, and Source Code
in C,” second edition, John Wiley & Sons, Inc., 1996.
55
Email :
[email protected]
[email protected]
Terima Kasih
56