Security-Oriented Analysis of Application Programs (SOAAP)[^c1].
Able to help with:
Reasoning about the compartmentalization tradeoffs is difficult:
Identifying a spot in the compartmentalization space is difficult:
This work:
Karger 1: access control, trojan horse, capability systems;
Provos 2: OpenSSH; Kilpatrick 3: Chromium;
Compartmentalization threat model:
Isolation:
OS Process model + MMU; + access controls (chroot, Linux seccomp, SELinux, Mac OS X, Capsicum)
Reusable/persistent sandbox:
__soaap_sandbox_persistent("dec2")
void dec2(int ifd, int ofd){
// secret key
char key[256];
read_stdin("password", key);
// ...
char *tmp = tmp_file();
int tfd = open(tmp, O_RDWR);
// ...
read(ifd, buffer, buffer_size);
// ...
if(l_flag){ // list contents
// ...
}else{
// ... // decompress tmp to output file
}
}
// + annotate to create compartment at the start of main(), via fork()
Sandbox access global variables -> report to human
to allow, use __soaap_var_read("dec2") iint l_flag = 0;
Annotate the private information:
char key[256] __soaap_private;
SOAAP will detect if this can leak from any external library functions.
use platform descriptors to reason about sandbox restrictions.
chroot() –> allow all system calls
seccomp –> only read(), write(), sigreturn(), exit();
file descriptors –> Capsicum enforce capability on them;
SOAAP able to model Capsicum behavior.
use __soaap_fd_permit(read)
to annotate the file descriptor to grant read permission.
Annotate the known CVE, SOAAP will evaluate the security risk (privileges being held by attackers) if got exploited.
__soaap_vuln_pt(“CVE-xxx-xxxx”)
may, must, flow sensitive, flow insensitive. different precisions.
tracking sensitive data/file descriptors: define-use chains.
Sandbox sensitive: data-flow within sandbox and between sandbox are distinguished, even if they contain overlapping code.
Function call target: function pointers, polymorphism, in C/C++. Infer targets by tracking assignments, also explicit annotate callees.
C++: AST & vtable in IR –> class hierarchy analysis (CHA) –> targets of virtual method call: all method definitions in the class hierachy rooted at the receiver object’s static type. (Receiver: callee object)
FreeBSD 10.1. Intel 4-core Xenon E5-1620 3.6GHz CPU, 64GB of RAM, 500GB SSD. Hyper-threading disabled. (?)
Use Capsicum as sandboxing platform.
Fetch in two parts: URL/HTTP header parsing; TLS via OpenSSL.
URL parsing. Annotate fetchParseURL()
with __soaap_sandbox_persistent
; password filed in url struct with __soaap_classify
.
Networking
code: fetch_c
code: libfetch_c
Okular: 80KLoC separated + 4MLoC external libraries analyzed.
OpenSSH: maintance is hard for the style of separation in OpenSSH
Chromium: scalability of SOAAP is good.
least privilege, Saltzer and Schroeder’s 1975 article, The Protection of Information in Computer Systems[^c38saltzer].
privilege separation. Trojan horse mitigation 1, Karger’s 1987 article. lays the conceptual groundwork for privilege separation.
OpenSSH2, Kilpatrick’s Privman3
User-level application compartmentalization in Java 4, Chromium 5, Capsicum6. Focus on intra-application security concerns rather than system privileges.
Interfaces between separated components. Cryptographic security APIs7,
compositional vulnerabilities among server and client sides of OpenSSL and JSSE. Beurdouche et al. 8
Privtrans9, code oriented view, program annotation, dividing operation between privileged and unprivileged.
Wedge10, programmer provided memory type information.
Harris et al.’s secure programming by parity games 11 reasons about the defense characteristics of Capsicum compartmentalization, representing policies as automata.
programs in modern browser architectures. In EuroSys ’09: Proceedings of the 4th ACM European Conference on Computer Systems (2009), ACM.
and Schemers, R. Going beyond the sandbox: An overview of the new security architecture in the Java Development Kit 1.2. In Proceedings of the Symposium on Internet Technologies and Systems (1997), USENIX.
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?