Sicurezza OS

Possiamo classificare tre aree generali quando si parla di sicurezza informatica: Hardware Software human-ware. Non tratteremo in particolare esattamente come ogni campo viene declinato, però possiamo Una altra tendenza generale è che più è complessa più è insicura. e questo senso di insicurezza cresce in modo maggiore rispetto al lineare. Security principles Open Design perché così può essere scrutata da più persone Economy of mechanism spiegata sotto. Fail-safe defaults questo molto importante perché molti sistemi hanno dei default che possono essere exploitati. Complete mediation: così abbiamo qualcosa che tracka tutti gli accessi, che controlla gli accessi. Least privilege questo va a braccetto con il fail-safe. Privilege separation così possiamo mettere in modo indipendente un privilegio per qualcos’altro. CIA properties Ne abbiamo parlato in modo leggermente inverso in Sicurezza delle reti e in Notions of Security. In questo caso sono ...

Reading Time: 6 minutes ·  By Xuanqiang 'Angelo' Huang

IPSec protocol

Questo è un protocollo di sicurezza a livello Rete e non più a livello socket! Perché vorremmo avere sicurezza a questo livello? È una cosa troppo comune da dover mettere a livello superiore (ma solitamente viene messa a questo livello per la sicurezza, quindi non è implementata ovunque per dire), quindi IPsec vuole facilitare l’implementazione dei principi CIA a un livello più basso, in modo che sia flessibile e customization. ...

Reading Time: 6 minutes ·  By Xuanqiang 'Angelo' Huang

Sicurezza delle reti

Obiettivi della sicurezza (!!!) Vogliamo creare delle reti che abbiamo certe garanzie di sicurezza, soprattutto: Confidenzialità, non vorremmo che il nostro messaggio sia intercettabile e leggibili da persone intermedie Integrità: non vogliamo che messaggi possano essere cambiati senza intervento del sender Autenticazione: vorremmo sapere con chi stiamo parlando, e vorremmo essere sicuri che non stiano mentendo sull’identità. Sicurezza operativa(Availability): vorremmo essere in grado di poter continuare a fornire il servizio (quindi non sia possibile dossare, o installare malware che modifichino il comportamento del servizio). Questi sono stati trattati un po’ in Notions of Security. ...

Reading Time: 10 minutes ·  By Xuanqiang 'Angelo' Huang

TLS-SSL protocol

First time we talked about this was in Sicurezza delle reti#Protocollo SSL But that was a simple toy model. Secure Socket Layer Secure socket Layer and TLS add security (see security principles in Notions of Security) on the transport layers, whereas IPSec protocol adds it to the network level. So this works on a higher level of abstraction following the ISO OSI framework Architettura e livelli 1, 2#Livelli ISO/OSI. SSL is the old version of the TLS protocol. This provides integrity and confidentiality to the communication, see Notions of Security. The main difference of SSL and TLS is that this has vulnerabilities like POODLE attack ...

Reading Time: 4 minutes ·  By Xuanqiang 'Angelo' Huang

Wireless attack vectors

In this note we will talk about some common ways to attack wireless based devices. Attacking an automated door Usually these doors are opened by radio frequency keys, and can be opened easily (e.g. replay attacks, Jam the frequency) Jamming This is the easiest way to attack. Just send many signals to make a certain frequency un-usable in our space. But with Frequency hopping this attack is solved. See Tecnologia Wireless#Frequency Hopping But this method could be easily known and observed (enables eavesdropping, against confidentiality, a principle in Notions of Security#CIAA principles of security.) if the initial seed is known. ...

Reading Time: 5 minutes ·  By Xuanqiang 'Angelo' Huang

Bag of words

Bag of words only takes into account the count of the words inside a document, ignoring all the syntax and boundaries. This method is very common for email classifications techniques. We can say bag of words can be some sort of pooling, it’s similar to the computer vision analogue. It’s difficult to say what is the best method (also a reason why people say NLP is difficult to teach). Introduction to bag of words Faremo una introduzione di applicazione di Naïve Bayes applicato alla classificazione di documenti. ...

Reading Time: 2 minutes ·  By Xuanqiang 'Angelo' Huang

Performance at Large Scales

Some specific phenomenons in modern systems happen only when we scale into large systems. This note will gather some observations about the most important phenomena we observe at these scales. Tail Latency Phenomenon Tail latency refers to the high-end response time experienced by When scaling our services, using Massive Parallel Processing, and similar technology, it is not rare that a small percentage of requests in a system experience a high-end response time, typically measured at the 95th or 99th percentile. This significant delays that can degrade user experience or system reliability. ...

Reading Time: 3 minutes ·  By Xuanqiang 'Angelo' Huang

Design patterns

Introduction to design patterns Tutte le immagini qui presenti sono prese da https://refactoring.guru/. Quello è il sito principale da tenere come reference. Introduzione personale I design patterns sono simili a dei plug and play, ossia delle soluzioni che hanno funzionato bene in passato e che sono ora riutilizzati. Solitamente dovrebbe essere una abilità implicita, cioè un buon programmatore è in grado di fare senza pensarci, dovrebbe essere automatico. Infatti quando uno fa il design non lo fa esplitamente seguendo un certo modello, ma farlo solitamente risulta utile per guidare il processo. ...

Reading Time: 4 minutes ·  By Xuanqiang 'Angelo' Huang

Automi e Regexp

Per l’analisi lessicale vogliamo cercare di ricordare le parole legali all’interno di questo linguaggio e questo è fatto con i linguaggi regolari. Introduzione a analizzatori lessicali Token Struttura del token è fatto da due parti Identificatore della classe del token Identificatore del valore del token Pattern e lessema ci sono direi boh Pattern e Lessema I pattern sono una descrizione generale della forma dei valori di una classe di token. ...

Reading Time: 5 minutes ·  By Xuanqiang 'Angelo' Huang

Bayesian neural networks

Robbins-Moro Algorithm The Algorithm $$ w_{n+1} = w_{n} - \alpha_{n} \Delta w_{n} $$For example with $\alpha_{0} > \alpha_{1} > \dots > \alpha_{n} \dots$, and $\alpha_{t} = \frac{1}{t}$ they satisfy the condition (in practice we use a constant $\alpha$, but we lose the convergence guarantee by Robbins Moro). More generally, the Robbins-Moro conditions re: $\sum_{n} \alpha_{n} = \infty$ $\sum_{n} \alpha_{n}^{2} < \infty$ Then the algorithm is guaranteed to converge to the best answer. One nice thing about this, is that we don’t need gradients. But often we use gradient versions (stochastic gradient descent and similar), using auto-grad, see Backpropagation. But learning with gradients brings some drawbacks: ...

Reading Time: 10 minutes ·  By Xuanqiang 'Angelo' Huang