AlpacaHack Logo

Tag: Win Function

Sign InSign Up
Win Function

This tag is used for challenges that contain a win function. (automatically translated from Japanese)

minaminao
·Updated Jun 17, 2026
Win Function Challenges

func-array

Daily AlpacaHackTopic: Function PointerReleased: May 6, 2026

165 solves
Pwn

by

trimscash

trimscash

Array of Alpaca function pointers 🦙🦙🦙🦙🦙

Beginner Hint (AI-translated)
  • This problem belongs to the Pwn category, specifically Pwnable (Binary Exploitation).
  • The goal is to launch a shell by executing the win function in a remote environment.
  • The asm volatile("mov $0,%spl"); in the win function is a process to simplify the problem. When calling the system function, rsp must be a multiple of 16. So, to simplify the problem here, we make rsp a multiple of 16 by setting the lower byte of rsp to 0. With this, we can execute the win function without worrying about it in this case. Reference
  • alpaca_functions is an array of function pointers placed on the stack.
  • When a function is called, the return address, the address to return to the original function, is placed on the stack.
func-array.tar.gz

Please sign in to submit the flag.

descriptionsolveswriteups