#include </etc/shadow>

Hanno's Blog

Monday, December 16. 2019

#include </etc/shadow>


Trackbacks

No Trackbacks

Comments
Display comments as (Linear | Threaded)

Accessing /etc/shadow with a compiler? Surely not.
On all systems that I have available I get the following:
$ cat t.c
#include
$ gcc t.c
t.c:1:10: fatal error: /etc/shadow: Permission denied
#include
^~~~~~~~~~~~~
compilation terminated.
#1 Jon on 2019-12-17 12:13 (Reply)
As he said: "This effectively means this service is running compile tasks as root"

I assume you don't run your compiler as root.
#1.1 pikzel on 2019-12-17 12:58 (Reply)
This reminds me of a compiler bomb attack involving C source code crafted to require massive amounts of memory and diskspace to compile.
#2 Arctic Kona (Homepage) on 2019-12-18 03:44 (Reply)
I once crashed my university's online compiler by #Include
#2.1 Han You on 2020-01-09 15:51 (Reply)
#include /dev/random
#2.2 Han You on 2020-01-09 15:52 (Reply)
On some OSs and filesystems you can also include directories as regular files. This allows you to enumerate files on the system.
#3 mzr on 2019-12-21 20:31 (Reply)
using .incbin
#3.1 mzr on 2019-12-21 20:33 (Reply)

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 

About

This blog is written by Hanno Böck. Unless noted otherwise, its content is licensed as CC0.

You can find my web page with links to my work as a journalist here.

I am also publishing a newsletter about climate change and decarbonization technologies.

The blog uses the free software Serendipity and is hosted at schokokeks.org.

Hanno on Mastodon | Contact / Imprint | Privacy / Datenschutz