Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Embedded Recipes 2018 - Yoctoception: Containers in the embedded world - Jéré...Anne Nicolas
Containerisation is a new player in the embedded world. Provisionning and rapid deployment doesn’t really make sense for embedded devices, but the extra security that container partitionning brings to the table is quickly becoming a “must have” for every embedded device.
However, the embedded world has its own constraints. Generic distributions like debian or Fedora are rarely used and tools like dockers can’t build software with custom build-chains the way Yocto or buildroot does it.
This talk will quickly review what are linux containers, why they are usefull in the embedde world, and then will study ways to generate container images using the yocto infrastructure and integrate them in another yocto image without breaking the package-based update system that Yocto provides.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Embedded Recipes 2018 - Yoctoception: Containers in the embedded world - Jéré...Anne Nicolas
Containerisation is a new player in the embedded world. Provisionning and rapid deployment doesn’t really make sense for embedded devices, but the extra security that container partitionning brings to the table is quickly becoming a “must have” for every embedded device.
However, the embedded world has its own constraints. Generic distributions like debian or Fedora are rarely used and tools like dockers can’t build software with custom build-chains the way Yocto or buildroot does it.
This talk will quickly review what are linux containers, why they are usefull in the embedde world, and then will study ways to generate container images using the yocto infrastructure and integrate them in another yocto image without breaking the package-based update system that Yocto provides.
1. NEBULA LEVEL 14
Prof.ssa Barbara Masucci - Studenti: Emanuele Gargiulo | Giovanni Danese
U n i v e r s i t à d e g l i S t u d i d i S a l e r n o | P r o g r a m m a z i o n e s i c u r a | A . A . 2 0 1 9 / 2 0
2. NEBULA
LEVEL
14
«This program resides in /home/flag14/flag14. It encrypts input and
writes it to standard output. An encrypted token file is also in that
home directory, decrypt it.» [exploit.education]
• level14 level14
•
INTRODUZIONE ALLA SFIDA
2
30. NEBULA
LEVEL
14
30
SCRITTURA DI UNO SCRIPT PER L’INVERSIONE DEL CIFRARIO
Sfruttando le conoscenze acquisite sul cifrario, si sottrae dal
codice UNICODE di ciascun carattere del token la sua posizione
all’interno della stringa.
Il risultante codice UNICODE viene poi riconvertito nel carattere
in chiaro.
32. NEBULA
LEVEL
14
32
SCRITTURA DI UNO SCRIPT PER L’INVERSIONE DEL CIFRARIO
len(token)
La funzione len prende in input una stringa e ne restituisce la
lunghezza.
Otteniamo così la lunghezza del token.
33. NEBULA
LEVEL
14
33
SCRITTURA DI UNO SCRIPT PER L’INVERSIONE DEL CIFRARIO
token.find(letter,counter,len(token))
La funzione find, eseguita su una stringa, cerca il primo
argomento tra le posizioni della stringa indicate dagli indici
nel secondo e terzo argomento, e ce ne restituisce la posizione.
Siccome la posizione restituita è quella della prima occorrenza
di letter, è necessario che ad ogni iterazione il contatore sia
incrementato per escludere dal campo di ricerca la parte di
stringa già considerata
34. NEBULA
LEVEL
14
34
SCRITTURA DI UNO SCRIPT PER L’INVERSIONE DEL CIFRARIO
token.find(‘a’,counter,len(token))
a b a c b …
token.find(‘a’,counter,len(token)) = 0
counter = 0
0 1 2 3 4 n
35. NEBULA
LEVEL
14
35
SCRITTURA DI UNO SCRIPT PER L’INVERSIONE DEL CIFRARIO
a b a c b …
token.find(‘a’,counter,len(token)) = 2
counter = 1
0 1 2 3 4 n
36. NEBULA
LEVEL
14
36
SCRITTURA DI UNO SCRIPT PER L’INVERSIONE DEL CIFRARIO
ord(letter)-token.find(letter,counter,len(token))
La funzione ord restituisce il numero intero che corrisponde al
codice UNICODE del carattere ad essa passato.
Da questo intero viene sottratta la posizione del carattere
all’interno della stringa
37. NEBULA
LEVEL
14
37
SCRITTURA DI UNO SCRIPT PER L’INVERSIONE DEL CIFRARIO
unichr(ord(letter)-token.find(letter,counter,len(token)))
La funzione unichr restituisce il carattere UNICODE relativo
all’intero ad essa passato.
38. NEBULA
LEVEL
14
38
SCRITTURA DI UNO SCRIPT PER L’INVERSIONE DEL CIFRARIO
returnpassword+=unichr(ord(letter)-token.find(letter,counter,len(token)))
Il carattere calcolato dall’insieme delle funzioni precedenti,
che altro non è che la ‘decodifica’ di un carattere del token,
viene concatenato alla stringa che al termine dello script
conterrà la password