Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 BGGP 4 (2023), Result has been announced on 31th Oct

views
     
TSMatQuasar
post Jul 10 2023, 09:19 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
QUOTE(epud2 @ Jul 10 2023, 08:59 PM)
32bit elf binary 171 bytes

It is the same as batch script, relying on external program to do replicating.
CODE

format ELF executable 3

segment readable executable

entry main

.......

segment readable writable



*
Hey, epud2! I think you can save a lot more, by using just one segment, you can move the arg* declaration after (below) "int 0x80", but make sure you set the first segment as "writeable" also.

That way you beat the 158-byte smallest ELF record! (A program header is about 56 bytes in 64-bit ELF, don't know about 32-bit ELF, or how many more bytes you can save) drool.gif
TSMatQuasar
post Jul 11 2023, 05:11 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
@epud2, I try to find out why the error when I run it, this is the stripped-down version to 118 bytes from yours:

CODE
format ELF executable 3

segment readable executable writeable

entry $

   mov ebx, bash
   mov ecx, arg
   mov al, 11
   int 0x80

arg    db '-c "echo 4"',0
bash   db '/bin/sh',0          


Again, when I run it, it says cannot execute the "a" program (I named it as "a") instead of /bin/bash or /bin/sh:

CODE
boo@DESKTOP-1V5DHQJ:/mnt/c/Users/BOO/Projects$ strace ./a
execve("./a", ["./a"], 0x7fffd638d550 /* 18 vars */) = -1 ENOEXEC (Exec format error)
strace: exec: Exec format error
+++ exited with 1 +++


Strange is it, it tries to execute the current calling program.


TSMatQuasar
post Jul 12 2023, 02:04 AM

Casual
***
Validating
329 posts

Joined: Jun 2023
QUOTE(epud2 @ Jul 11 2023, 10:12 PM)
Sorry for late respond

» Click to show Spoiler - click again to hide... «

*
Thanks for your kind reply. And your explanation helps. It is a pity you don't want to participate, but I am glad you are able to solve it using such a small piece of code. Much better than my 290 bytes program, hah.

I am also amazed by what others know. No one knows everything, we need to consult in a group, and I too, always benefit by sharing my knowledge, because then other persons can show a better way to do it, or show me there is something wrong in my understanding.
That said, I am amazed at the way you know how to use stack pointer efficiently, I always need some time to figure out whether stack grows downward or upward in x86 systems.

Your code met the contest entry requirement, you just need to include sha256 and base64 of your binary, then link to your weiteup or/and source code. You are welcomed to submit it anytime if you change your mind later.

It was nice to know you capable of doing reversing that day and doing compact ELF code yesterday.
TSMatQuasar
post Jul 12 2023, 06:59 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
There are a couple more file type submitted to BGGP4.
Besides following @binarygolf, you can also follow hashtag #BGGP4, because most posts were not retweeted by @binarygolf.

Lastest, a self-replicating HTML, click this and be surprised:
https :// remyhax.xyz/4.html

(You have been warned)
TSMatQuasar
post Jul 20 2023, 09:13 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
The organizer of BGGP4 themselves already showcased their UEFI App that displays "4" (and replicate itself?).

user posted image

It is amazing they able to make certain registers with "44444444" like RIP (instruction pointer)

I know UEFI app is also PE format, and can be done in C#, but I totally have no idea about it.
TSMatQuasar
post Jul 23 2023, 03:41 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
Still one month to go before this year BGGP competition ends. Hehe.

By the way, the organizer has retweeted several submissions, so please check out your Feeds (if you follow @binarygolf) for the updates, include a even smaller Python script submission!
TSMatQuasar
post Jul 23 2023, 07:06 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
QUOTE(flashang @ Jul 21 2023, 08:52 AM)
at the end, the shortest is "use shell to copy file and echo 4"
and the contest become less meaningful.

it become what @angch said "not as fun as it *could* be."

hmm.gif
*
True, maybe only except HTML:

CODE
<body/><script>d=document;e=d.createElement('a');s='setAttribute';i='innerHTML';e[s]('href','data:application/o;,'+'<body/>'+d.body[i]);d.body[i]=4;e[s]('download',4);e.click()</script>


I think that is very advanced code for average programmer like me. flex.gif
TSMatQuasar
post Jul 28 2023, 04:16 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
This is even shorter than the official shell script example:

CODE
cp $0 4;ls 4


https://rap.sh/Shell_Script_Golf

The official example is 2 bytes longer:
CODE
cp $0 4;echo 4


Walau....
TSMatQuasar
post Jul 31 2023, 03:19 AM

Casual
***
Validating
329 posts

Joined: Jun 2023
A software developer at Google also participated BGGP4 with his 110 byte ELF32.

https://github.com/CianLR/bggp4
TSMatQuasar
post Jul 31 2023, 09:01 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
It is possible to do self-replicating GIF, by referring to this article by Google Project Zero.

What is Project Zero:
QUOTE
Formed in 2014, Project Zero is a team of security researchers at Google who study zero-day vulnerabilities in the hardware and software systems that are depended upon by users around the world. Our mission is to make the discovery and exploitation of security vulnerabilities more difficult, and to significantly improve the safety and security of the Internet for everyone.

We perform vulnerability research on popular software like mobile operating systems, web browsers, and open source libraries. We use the results from this research to patch serious security vulnerabilities, to improve our understanding of how exploit-based attacks work, and to drive long-term structural improvements to security.


The article: https://googleprojectzero.blogspot.com/2022...box-escape.html
TSMatQuasar
post Jul 31 2023, 09:12 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
QUOTE(MatQuasar @ Jul 3 2023, 09:11 AM)
I sent another entry, this time is DLL.....

user posted image
*
Found a DLL entry for BGGP4 by a user on Mastodon:

QUOTE
Dn-FamiTracker-dll-hijack
BGGP4 Submission https://binary.golf/

Produce exactly 1 copy of itself ✅
Name the copy "4" ✅
Not execute the copied file ✅
Print, return, or display the number 4 ✅
Size: 19456 bggp4.dll (pretty big for a dll?)

Dn-FamiTracker v0.5.0.1 contains an undocumented plugins feature.

https://github.com/Dn-Programming-Core-Mana...racker/releases

Step 1. Download and unzip Dn-FamiTracker v0.5.0.1

Step 2. Create a folder called Plugins in the same directory as the exe

Step 3. Place attached DLL in the folder, name it bggp4.dll

Step 4. Launch Dn-Famitracker


https://github.com/eatscrayon/Dn-FamiTracker-dll-hijack

Mine is only 3KB! His/Hers is 19KB, I win!!! rclxm9.gif

But I understand that it is a hijack, his/her DLL has exported function only known to Dn-FamiTracker:
CODE
; fasm1 autogenerated include
; builder script: "export.cmd"
; library bggp4.dll, "C:\FASMW\bggp4.dll"

import bggp4.dll,\
 file_exists, "file_exists"


I tried running "rundll32 bggp4.dll, file_exists" but it doesn't work that way.

Check out more on : https://haunted.computer/tags/BGGP4 on Mastodon, or
https://twitter.com/hashtag/BGGP4 on Twitter.

----

International visitors might see this thread if searched from Google, currently listed as no. 2 in search result using keyword "bggp4".

This post has been edited by MatQuasar: Aug 6 2023, 05:45 PM
TSMatQuasar
post Aug 19 2023, 03:11 AM

Casual
***
Validating
329 posts

Joined: Jun 2023
The competition is ending soon, still 6 days left.

The organizer of BGGP said they might migrate @binarygolf account from Twitter to Mastodon in the future.

Sad news is @junyian is not participating as he is busy with his day job.

---

Update: 3 days left until deadline.

Can't wait to see the result on netspooky's GitHub BGGP repo.

I hope to see @angch, @flashang, @bitRAKE (from other forum) in this year's BGGP competition.

This post has been edited by MatQuasar: Aug 22 2023, 09:59 PM
TSMatQuasar
post Aug 22 2023, 10:03 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
Here is the video "DN-Famitracker Plugin #BGGP4" by eatscrayon (He/she is a hacker)


TSMatQuasar
post Aug 24 2023, 05:43 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
The competition is not ending tomorrow, but it has been extended for another two weeks.

The organizer said this year entries is more than twice as much as last year, last year about 30 submission, so this year 60+ submission is expected, wah..... Me alone had submitted 3 entries....

Update (for those not on Twitter or Mastodon following @binarygolf)
user posted image

EDIT: To visit their Mastodon profile, type in URL like this https://haunted.computer/@binarygolf

This post has been edited by MatQuasar: Aug 24 2023, 09:20 PM
TSMatQuasar
post Sep 4 2023, 06:41 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
Some notes by organizer of BGGP worths reading tongue.gif
https://haunted.computer/@netspooky/111053550813845300

user posted image

Reposted from : https://haunted.computer/@binarygolf/111054125124497417

This post has been edited by MatQuasar: Sep 26 2023, 05:03 PM
TSMatQuasar
post Sep 22 2023, 03:31 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
Result is expected to be uploaded to the organizer's GitHub repo:

https://github.com/netspooky/BGGP

It has not been announced yet, so perhaps anyone eagerly waiting can check the GitHub repo above for "2023" folder in the next few days for BGGP4 result.

----

https://xcellerator.github.io/posts/bggp4/ says:
QUOTE
Similar to previous years, I didn’t actually submit any of these entries for scoring as I actually help out with scoring other people’s entries with the Binary Golf Association.


So xcellerator, a smart guy in Linux kernel hacking and tmp.0ut 1:1 contributor, was not participating BGGP3 and BGGP4 even though he had entries / write-ups for them. He is joining netspooky to score our entries, nice one!

This post has been edited by MatQuasar: Sep 26 2023, 05:05 PM
TSMatQuasar
post Oct 28 2023, 05:41 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
QUOTE(flashang @ Jul 6 2023, 08:56 PM)
Just learn lua for some testing when free.
It's quite easy.

smile.gif
*
It is certainly nice to see you latest work: https://github.com/Flash-ang/lua-mod using Lua . rclxm9.gif

But I am not familiar with web server, so have no clue how to run it.




TSMatQuasar
post Oct 31 2023, 01:04 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
Finally, results have been announced 4 hours ago on:

https://github.com/binarygolf/BGGP/tree/main/2023


TSMatQuasar
post Oct 31 2023, 01:10 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
QUOTE(flashang @ Jun 24 2023, 10:24 PM)
already submitted lua file.

may be do other language when free.

smile.gif
*
user posted image

Woohoo, you won the Lua category! rclxm9.gif

You're No. 2 in PHP category. Not bad!

And you ranked No. 2 in Python..... rclxms.gif
user posted image

This post has been edited by MatQuasar: Oct 31 2023, 01:15 PM
TSMatQuasar
post Oct 31 2023, 01:13 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
I won the PE category! Yuppy! My ELF, however, ranked the last.

user posted image

Link to my PE write-up:

How to create 1024-byte PE for BGGP4 code golf
( https://forum.lowyat.net/topic/5406205 )

This post has been edited by MatQuasar: Oct 31 2023, 01:50 PM

3 Pages < 1 2 3 >Top
 

Change to:
| Lo-Fi Version
0.0791sec    1.15    6 queries    GZIP Disabled
Time is now: 24th December 2025 - 01:15 PM