Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aslr is not disabled #1

Open
4390c336 opened this issue Apr 30, 2020 · 5 comments
Open

aslr is not disabled #1

4390c336 opened this issue Apr 30, 2020 · 5 comments

Comments

@4390c336
Copy link

Hi man :)
I love the work you did here !
but just to let you know ! you can't just disable ASRL from within the docker ! even when you are running with --privileged

simple test script :

#include <stdlib.h>

void foo(){}

int main(int argc, char *argv[]){
    int y;
    char *x = (char *) malloc(128);

    printf("Library functions: %08x, Heap: %08x, Stack: %08x, Binary: %08x\n",
           &malloc, x, &y, &foo);
}

output :

Library functions: f7e25c30, Heap: 565bb160, Stack: ffd374a4, Binary: 565785ad
root@0beb4a114a2f:/tmp# ./test
Library functions: f7e2cc30, Heap: 56749160, Stack: ffb60094, Binary: 565955ad
root@0beb4a114a2f:/tmp# ./test
Library functions: f7df2c30, Heap: 579a7160, Stack: ffb041d4, Binary: 566465ad
@Souptik2001
Copy link

Yes actually its possible I think because it worked for me. I updated the dockerfile and it worked - #2

@4390c336
Copy link
Author

@Souptik2001 can you try using the C program I mention above and share the results here ?

@Souptik2001
Copy link

Ok here is a screenshot of the output. ESP is same every time :
test
You can also check the value of the "/proc/sys/kernel/randomize_va_space" file its 0.

@4390c336
Copy link
Author

@Souptik2001 are you sure that ASLR is not disabled on your host system ?

@Souptik2001
Copy link

Oh, Yes ASLR on my host system is getting disabled or enabled as soon as I am enabling or disabling it on the container. I am able to change the ASLR value but it is also affecting my host system.
I turned on aslr on my host system and started the container and as soon as the CMD ran on the Dockerfile it also disabled the ASLR on my host system...I am not really getting this that how am I able to control the aslr value of the host from the container. I have to look into this a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants