AlpacaHack Logo
Sign InSign Up
Daily AlpacaHack

A CTF challenge series with fun puzzles to enjoy every day

What is Daily AlpacaHack?

We regularly publish simple, beginner-friendly or educational CTF challenges!

Join Anytime

Solve each challenge within its time window to appear on the leaderboard.

Not a Competition

Discussion with friends or AI is welcome (account sharing is prohibited).

Solution Sharing Rules

Sharing solutions is allowed only after the challenge period has ended.

Solve stats

0

/13

No solved challenges yet.

Sign In to view your player stats

Today's Challenge
tan90909090tan90909090
Let's analyze system calls
Rev
Medium
13 solves
Submissions (latest 3)
baumroll1234

SOLVED!

Aug 26, 11:09 PM

Leaderboard

Try the first challenge

Is this your first CTF? Let's begin by tackling the first challenge released on Daily AlpacaHack.

View challenge
admin
AlpacaHack 2100
Misc
Welcome🌱
2,158 solves
Upcoming challenges reveal the , , and in advance.
Prev

Aug 2026

Next
Solved
Unsolved
Upcoming
Mon
Tue
Wed
Thu
Fri
Sat
Sun
27
tchentchen
RFC100008
Web
Easy🌱
142 solves
28
2501
One More Approval
Crypto
Medium
61 solves
29
2501
zen.zip
Misc
Medium
68 solves
30
2501
Anyrunner
Misc
Medium
65 solves
31
tchentchen
Small Image Uploader 2
Web
Medium
61 solves
1
admin
Día Nacional de la Alpaca
Misc
Welcome🌱
227 solves
2
2501
Password, Please
Misc
Easy🌱
193 solves
3-4
arkark
Long Long Flag Printer 2026
Misc
Medium
93 solves
5
pppp4649pppp4649
Happy Birthday
Crypto
Easy🌱
126 solves
6-8
hiikunzhiikunz
AESAESAESAESAESAES
Crypto
Hard
59 solves
9-10
tchentchen
Not so Pyf**k
Misc
Medium
84 solves
 
tchentchen
Not so Pyf**k
Misc
Medium
84 solves
11-12
baumroll1234
Fermat's Last Theorem
Misc
Medium
81 solves
13-15
tchentchen
True or False 2
Misc
Hard
53 solves
16-17
tchentchen
List Sharing
Web
Medium
73 solves
 
tchentchen
List Sharing
Web
Medium
73 solves
18-20
tan90909090tan90909090
wrong instruction
Rev
Hard
58 solves
21-23
tchentchen
Greetings i18n 2
Web
Hard
50 solves
24-26
tchentchen
Xwitter
Web
Hard
33 solves
27-28
tan90909090tan90909090
Let's analyze system calls
Rev
Medium
13 solves
29-31
tchentchen
Planned topicAuthorization
Web
Medium
 
Planned topicAuthorization
Web
Medium
1
Coming soon
2
Coming soon
3
Coming soon
4
Coming soon
5
Coming soon
6
Coming soon

Want a harder challenge?

Go to B-SIDE

Writeups

power

Writeup for Encoding Basics

power

ja
Encoding Basics

13 hours ago

power

Writeup for Bars

ja

17 hours ago

power

Writeup for Leaked Flag Checker

ja

2026/08/18 11:53

power

Writeup for Password, Please

ja

2026/08/18 03:26

Rows:

Let's analyze system calls

Topic: System CallReleased: Aug 27, 2026

13 solves
Rev
Medium3.0

by

tan90909090

tan90909090

Let's analyze x86-64 Linux system calls!

Beginner Hint 1: The Calling Convention for System Calls and GCC's Extended Inline Assembly
  • The calling convention for system calls on x86-64 Linux is described in the A.2.1 Calling Conventions section of the System V Application Binary Interface AMD64 Architecture Processor Supplement which is available at https://gitlab.com/x86-psABIs/x86-64-ABI, and https://man7.org/linux/man-pages/man2/syscall.2.html.
    • To execute a system call, we need to specify a system call number to the rax register, and up to six arguments to the rdi, rsi, rdx, r10, r8, and r9 registers sequentially, and then execute a syscall instruction.
    • The result of the system call execution is stored in the rax register.
  • GCC's extended inline assembly syntax is described at https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html and https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
    • The extended inline assembly used for the first syscall instruction in this challenge specifies the following:
      • A OutputOperands parameter is unspecified.
      • A InputOperands parameter set 318 in the rax register, &result_1 in the rdi register, sizeof(result_1) in the rsi register, and 0 in the rdx register, before executing the extended inline assembly.
      • A Clobbers parameter specifies that the rcx register, r11 register, and memory will be modified during the execution of the extended inline assembly.
        • Note that a syscall instruction itself modifies the rcx and r11 registers.
    • The extended inline assembly used for the second syscall instruction in this challenge specifies the following:
      • A OutputOperands parameter specifies that a content of the rax register are assigned to result_2 after the extended inline assembly executes.
      • A InputOperands parameter set 102 in the rax register before executing the extended inline assembly.
      • A Clobbers parameter specifies that the rcx register, r11 register will be modified during the execution of the extended inline assembly.
Beginner Hint 2: Approach to Solving the Challenge
  • There are several ways to approach this challenge.
  • One ways is to look up the system call numbers for x86-64 Linux and check the arguments and return values for the corresponding system call.
  • Another way is to use a decompiler.
    • Some decompilers can perfectly decompile syscall calls from the start, while others produce poor decompiled results initially but can be perfectly decompiled with additional operations.
lets-analyze-system-calls.tar.gz

Please sign in to submit the flag.

descriptionsolves