C obfuscation

How in the fuck does this work?
ioccc.org/2018/endoh2/prog.c

Video of it, if you're too paranoid to run it
youtube.com/watch?v=6Ak1DC1uBuc

Attached: dead.png (677x476, 349K)

Other urls found in this thread:

youtube.com/watch?v=QMYfkOtYYlg
github.com/mame/quine-relay
openhub.net/p/systemd
openhub.net/p?query=systemd
openhub.net/p/openbsd/analyses/latest/languages_summary
ioccc.org/2018/endoh2/prog.c
ioccc.org/2012/endoh1/endoh1.c
ioccc.org/2012/endoh1/endoh1_color.c
en.wikipedia.org/wiki/Underhanded_C_Contest
slashdot.org/story/192699
twitter.com/NSFWRedditImage

And it's beautiful

Very cool

See the ASCII fluid simulation of thus dude, you will freak out
youtube.com/watch?v=QMYfkOtYYlg

That's beautiful, and i can't even understand the unobfuscated code.

"Is beautiful because is simple. It just take a genius to understand its simplicity."

Attached: dennis_ritchie.jpg (587x551, 50K)

whats this technique called? if it even has as name yet

#include
#include
#include
#include
#include

static jmp_buf env;

static const char* shc =
"\x55\x48\x89\xe5\x48\x89\x7d\xe8\x48\x8b\x45\xe8"
"\xc7\x00\x08\x00\x00\x00\x48\xc7\x45\xf8\x00\x00"
"\x00\x00\x48\x8b\x45\x08\x48\x89\x45\xf8\x48\x8b"
"\x45\xf8\x5d\xc3\x69\x05\x05\x01\xed\x0b\x00\xb4"
"\x47\xfe\x09\x06\xfb\x00\x9b\xf6\xde\xad\xbe\xef";

static int calculate(int a, int b)
{
do
{
a ^= b;
b = (a ^ b) & b;
b

Metaprogramming?

i guess; but im looking for maybe a more specific term (if one exists) for how you generate code that generates code that generates code etc.

meta programming, literally
code generating code
meta programming could have many layers
it itsn't just one piece of code generating another piece of code
the piece of code could generate other pieces of code, which in turn could each generate more code, and so on.

You can start here, also read the "issues"
github.com/mame/quine-relay
From the same guy who wrote and (He is like an alien or something)

Attached: langs.png (750x750, 134K)

>"dude NSA code is safe because everyone looks at it"
>meanwhile there's contests on how to be maximum tricky with C

obfuscated code isn't counted as source code and so it would literally go against the gpl's terms anyways. stop being a fucking paranoid schizo

you know how the saying goes
anything you do, an asian will do better than you

Quine Relay (as in the repo that someone linked bellow) or Ouroboros program. A Quine is a program that outpouts itself. A Quine relay then it's as in the OP a series p_1, p_2...p_n such that for p_i, i < n the output is p_(i + 1) and the output is p_1. Ouroboros is that symbol with the snake/dragon eating it's own tail used to signify cyclical stuff.

>He thinks that you have to obfuscate code to put back doors in the software...

Lines of code (just code, no comments, no blanks):

GNU Coreutils: 93k
SystemD: 468M (just the init)
Linux Kernel: 36M
Debian base-system: 86M (include all above)

For reference:
Chromium: 25M
Firefox: 20M

OpenBSD: 29M
The base installation of OpenBSD is a ready-to-use OS whit a lot of common utilities (unlike Debian base install, for example). Is an actually security-focused regularly audited OS, with a lot of effort by ~120 contributors (-last year- compared to ~500 Linux contributors).

9front (Plan9 fork): 3M
This one don't need too much love to become a "usable by normies" OS.

In a perfect world, the perfect OS probably would have 5M loc, maybe still would follow the unix philosophy, but this time with a full-fledge graphical environment, a decent browser, even some games, and a decent amount of well written and minimal implemented alternative versions of the most popular today demanded tools... And would be coded by less than 5 programmers!.

TLDR: there's no need to obfuscate code or make it less readable in some way to make software insecure. The only thing you need to do is carelessly accept most "contributions" of third parties, until the audit efforts become futile.

Attached: opens source.jpg (1152x1150, 190K)

systemd a shit, but it don't do 468M loc, it don't.
1.2M is still wayyyy too much. It's nothing but # startx basically.

Kek, sorry, was a typo: it's 468K just of init, ~800k the other systemd utilities
openhub.net/p/systemd
openhub.net/p?query=systemd

bump

OpenBSD's base + X + compiler suite is only 1.2 million loc.

wow. just even a competent programmer would have a hard time finding any sort of security issue or even a programmed obvious something like a key logger hidden in line 5million of 98 million as if.

>SystemD: 468M (just the init)
Systemd does way more than just being an init. It's a suite of lower-level userspace tools.
And that's K, not M, you fuckface.

The numbers I got are based on
openhub.net/p/openbsd/analyses/latest/languages_summary
Also, pic related shows 15M loc (OpenBSD's src github mirror)
Honestly I don't know what this means or where it points...

Attached: 1561251746541.jpg (720x850, 90K)

Most of that stuff isn't in base.

...

Does anyone know any good program to autoformat C/C++ code?

for example
>ioccc.org/2018/endoh2/prog.c
this is unable to be parsed by e.g. netbeans.

very impressive, do you have the source?

>>> video description

Attached: 1561253503391.jpg (747x491, 43K)

ioccc.org/2012/endoh1/endoh1.c
ioccc.org/2012/endoh1/endoh1_color.c

en.wikipedia.org/wiki/Underhanded_C_Contest

Not fucking around here, are they?

Attached: Screen Shot 2019-06-23 at 12.05.37 pm.png (1558x260, 90K)

slashdot.org/story/192699
One short line, that's enough.
And that line wasn't found by auditing the code, but by a conflict between VCSs.
Make you think, how many undiscovered backdoors lies on the Linux kernel?, one thing is sure: at least less than in the Windows kernel... Right?.

What is this code?

Attached: 1561257124436.jpg (528x705, 49K)

wtf

>notice unapproved change in code
>undo it
Woah dude I'm so spooked, FOSS btfo. Wait no, everything worked as intended.

So on Windows.

How does one achieve this level of madness?

Attached: 1510943737953.gif (320x200, 1.9M)

By being a workaholic autist, like most Asians.
They don't belong to this planet.

Attached: 1561271073506.jpg (600x429, 49K)

Supporting all the different types of hardware makes an OS's LoC shoot right up.

Hell even lines of code doesn't matter
C is so unsafe that even hello world is a backdoor, use Rust instead

Why not Go?

Don't you have anything better to do?

Attached: 1561271997435.jpg (357x500, 78K)

>I'm so shit with using C that an idiot like me would create backdoors in a simple program like Hello World
FTFY

bump

It's a puzzle, guess what it outputs.

Later, on a VM.q I need to sleep now

Attached: 1561287387909.jpg (1440x1709, 103K)

No need to run anything, just figure out how it is able to print that.

Attached: Screenshot 2019-06-23 at 14.47.05.png (1346x282, 66K)

kek, he used everything confusing in his power to print out the sacred phrase

>shellcode in random snippet

Nice try, pajeet.

See