diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..125782a --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +all: dnsssh.pdf fediverse.pdf ldap.pdf mrezeosi.pdf python.pdf recon.pdf sql.pdf stajedecentrala.pdf surveillancerequired.pdf tls.pdf uvodulinux.pdf uvodumreze.pdf +dnsssh.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/dnsssh/dnsssh.md -o slides/dnsssh/dnsssh.pdf + +fediverse.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/fediverse/fediverse.md -o slides/fediverse/fediverse.pdf + +ldap.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/ldap/ldap.md -o slides/ldap/ldap.pdf + +mrezeosi.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/mrezeosi/mrezeosi.md -o slides/mrezeosi/mrezeosi.pdf + +python.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/python/python.md -o slides/python/python.pdf + +recon.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/recon/recon.md -o slides/recon/recon.pdf + +sql.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/sql/sql.md -o slides/sql/sql.pdf + +stajedecentrala.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/stajedecentrala/stajedecentrala.md -o slides/stajedecentrala/stajedecentrala.pdf + +surveillancerequired.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/surveillancerequired/surveillancerequired.md -o slides/surveillancerequired/surveillancerequired.pdf + +tls.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/tls/tls.md -o slides/tls/tls.pdf + +uvodulinux.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/uvodulinux/uvodulinux.md -o slides/uvodulinux/uvodulinux.pdf + +uvodumreze.pdf: + pandoc -t beamer -V theme:Warsaw -i slides/uvodumreze/uvodumreze.md -o slides/uvodumreze/uvodumreze.pdf + +clean: + rm -f slides/dnsssh/dnsssh.pdf slides/fediverse/fediverse.pdf slides/ldap/ldap.pdf slides/mrezeosi/mrezeosi.pdf slides/python/python.pdf slides/recon/recon.pdf slides/sql/sql.pdf slides/stajedecentrala/stajedecentrala.pdf slides/surveillancerequired/surveillancerequired.pdf slides/tls/tls.pdf slides/uvodulinux/uvodulinux.pdf slides/uvodumreze/uvodumreze.pdf diff --git a/slides/ldap/ldap.jpg b/slides/ldap/ldap.jpg new file mode 100644 index 0000000..39b691d Binary files /dev/null and b/slides/ldap/ldap.jpg differ diff --git a/slides/ldap/ldap.md b/slides/ldap/ldap.md new file mode 100644 index 0000000..5226c7b --- /dev/null +++ b/slides/ldap/ldap.md @@ -0,0 +1,83 @@ +# LDAP + +# Sta je LDAP? + +- Protokol za cuvanje i pristup podatcima +- Uglavnom informacije o korisnicima (username,password) +- Hierarhijska struktura (grupe korisnika) +- Veliki broj servisa ima opciju za LDAP za korisnike + +# Hierarhija + + +![ldap](slides/ldap/ldap.jpg) + +# Hierarhija + +- Domain component (DC) +- Organizational Unit (OU) +- Korisnici (UID) + +# Klase i atributi + +- Distinguished Name (dn) +- Object class +- Atributi + +# Search + +(&(objectClass=person)(givenName=John)) + +# OpenLDAP + +OpenBSD-ova implementacija LDAP-a + +# Python + +python3-ldap3 biblioteka + +# python3-ldap3 setup + +CONNECTION TO LDAP SERVER + +from ldap3 import Server,Connection,ALL,MODIFY_REPLACE + +s=Server('192.168.122.233',use_ssl=True,get_info=ALL) +c=Connection(s,'cn=cn=admin,dc=example,dc=com','secret',auto_bind=True) + +# python3-ldap3 setup + +ADD DC OBJECT + +objectClass = ['dcObject', 'organization'] + +attributes = {'o' : 'example', 'dc' : 'example'} + +c.add('dc=example,dc=com',objectClass, attributes) + +# python3-ldap3 setup + +ADD ORGANISATIONAL UNIT + +objectClass = ['top', 'organizationalUnit'] + +attributes = {'ou' : 'users'} + +c.add('ou=users,dc=example,dc=com', objectClass, attributes) + +# python3-ldap3 manage users + +ADD USERS + +objectClass = ['top', 'person', 'organizationalPerson', 'inetOrgPerson', 'posixAccount', 'shadowAccount'] + +attributes = {'cn' : 'user1', 'sn' : 'user1', 'givenName' : 'user1', 'uid' : 'user1', 'uidNumber' : 1001, 'gidNumber' : 1001, 'homeDirectory' : '/home/user1', 'loginShell' : '/bin/sh', 'gecos' : 'SystemUser', 'shadowLastChange' : 19433, 'shadowMax' : '45', 'userPassword' : 'password123'} + +c.add('uid='user1,ou=users,dc=example,dc=com',objectClass, attributes) + +# python3-ldap3 manage users + +DELETE USERS + +c.delete('user1,ou=users,dc=example,dc=com') + diff --git a/slides/ldap/ldap.pdf b/slides/ldap/ldap.pdf new file mode 100644 index 0000000..6a48442 Binary files /dev/null and b/slides/ldap/ldap.pdf differ diff --git a/slides/python/python.md b/slides/python/python.md new file mode 100644 index 0000000..80f5ea7 --- /dev/null +++ b/slides/python/python.md @@ -0,0 +1,21 @@ +# Uvod u programiranje + +# Promenjive + +- Mesto gde drzimo podatke +- godina=2023 +- godina=2022+1 +- prethodna=2022 + godina=prethodna+1 + +# Redosled + +- 2023=godina (ne moze!) +- godina+1=2023 (ne moze!) + +# Tip +- ime="Dragan" +- prezime="Jovanovic" +- punoime=ime+prezime +- godina="2023" + godina=2023 diff --git a/slides/sql/sql.md b/slides/sql/sql.md new file mode 100644 index 0000000..4be7f69 --- /dev/null +++ b/slides/sql/sql.md @@ -0,0 +1,26 @@ +# SQL baze podataka + +# Tabele + +Tabela + +![userstable](./slides/sql/table.png) + +# Baza + +- vise tabela u jednoj bazi +- pristup preko mreze +- SQL jezik +- pozivanje upita iz drugih jezika + +# SQL + +- SELECT username,password FROM userstable +- SELECT * FROM userstable +- SELECT password FROM userstable WHERE username='korisnik1' +- INSERT INTO userstable (username, password) VALUES (newuser3, pass1) + +# Bezbednost + +- SQL injection +- PDO diff --git a/slides/sql/sql.pdf b/slides/sql/sql.pdf new file mode 100644 index 0000000..15e68f6 Binary files /dev/null and b/slides/sql/sql.pdf differ diff --git a/slides/sql/table.png b/slides/sql/table.png new file mode 100644 index 0000000..60cd5aa Binary files /dev/null and b/slides/sql/table.png differ