Questions tagged [pwntools]

pwntools is a CTF framework and exploit development library.

pwntools is a CTF framework and exploit development library.

77 questions
0
votes
1 answer

Every time I run my script it returns `_curses.error: must call setupterm() first` why?

I'm currently trying to learn pwn in python. I wrote a simple Hello world script: from pwn import * io = process('sh') io.sendline('echo Hello, world') io.recvline() and let it run. Immediately two errors returned stating: _curses.error:…
same
  • 5
  • 4
0
votes
1 answer

Why use cat to open interactive shell?

(Asking again without the download link) Problem Description Nana told me that buffer overflow is one of the most common software vulnerability. Is that true? bof.c #include #include #include void func(int key){ …
luke.lcim
  • 91
  • 1
  • 7
0
votes
1 answer

Giving interactive control of a Python program to the user

I need my Python program to do some stuff, and at a certain point give control to the user (like a normal Python shell when you run python3 or whatever) so that he can interact with it via command line. I was thinking of using pwntools's…
memememe
  • 663
  • 6
  • 21
0
votes
1 answer

import pwn crashes in PyCharm, but works when run from terminal

When I try to run the line import pwn in PyCharm, it crashes with this error message: /usr/local/bin/python3.8 /Users/ianzhang/Documents/Coding/CTF/buffer_overflow1.py Warning: _curses.error: setupterm: could not find terminfo database Traceback…
izhang05
  • 744
  • 2
  • 11
  • 26
0
votes
1 answer

How to solve PWN challenge?

I am very new to PWN and have very less idea how to solve PWN problems. Recently, I came across a Capture The Flag (CTF) challenge, where I found a pwn to find out the flag. I am using Linux-Ubuntu -16.04. Below program is a PWN program running on…
asoni94
  • 137
  • 2
  • 11
0
votes
1 answer

how to continue in a python script, if the program exits/crashes with pwntools?

I want to continue the python script do things, when the program crashes/exits. But it does not work. For example: from pwn import * p = process("./proc") p.interactive() print("Some stuff") But when the progam proc…
BitFriends
  • 379
  • 5
  • 18
0
votes
1 answer

how to display chunk information using pwndbg

Linux: Ubuntu 16.04 VMware 15 I'm currently learning how to use pwndbg. When I try to display the chunk details using the command heap. It shows one allocated chunk that only displays the addr and size this is what shows up when I do heap inspection…
qwqer
  • 3
  • 2
0
votes
1 answer

Why the address of buf is 0x12 instead of 10?

My code is as follows: #include #include void myread () { char s[10]; read(0, s, 100); } void getshell () { system("/bin/bash"); } int main () { myread(); return 0; } I compiled the code and used ida…
wangyong
  • 11
  • 2
0
votes
1 answer

When I try to debug my program with gdb through pwntools, gdb insert a breakpoint at 0xXXX address

When I try to debug my program with gdb through pwntools, gdb insert a breakpoint at 0xc0f address. This address corresponds to the beginning of my program without the randomized part. Below, my python script with pwntools: #! /usr/bin/python2.7 #…
salt
  • 820
  • 11
  • 26
0
votes
2 answers

pwntools python not importing

$ apt-get update $ apt-get install python2.7 python-pip python-dev git libssl-dev libffi-dev build-essential $ pip install --upgrade pip $ pip install --upgrade pwntools After I ran the above command to install pwntools when I go to python and…
christoss
  • 90
  • 1
  • 1
  • 8
0
votes
1 answer

Increment a Variable With an Unknown Type

Within the pwntools library in Python 2.7, an address is declared as address = p64(0x7fffffff0000). I've been racking my brain trying to figure out how to increment this address, though I keep running into conversion errors during the edition. I…
Henry F
  • 4,960
  • 11
  • 55
  • 98
0
votes
1 answer

The pwntools module is not applied

Install the App Press Command+Space and type Terminal and press enter/return key. Run in Terminal app: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null and press enter/return key.…
Ian Lee
  • 1
  • 1
  • 1
-1
votes
1 answer

Execute Command in Binary String Format in Python3

I am retrieving simple assignment commands from a remote terminal connection in Python, and would like to execute them. The format will be like b = 3156, and I would like to execute it using exec(). My code: def execbin(cmd): …
Power_tile
  • 578
  • 1
  • 6
  • 18
-1
votes
1 answer

pyinstaller isn't converting (or generate a corrupted exe) when pwn package is imported

i am working on reverse shell project using pwn as Client/Server instead of using socket because it's more comfortable in receiving (recvuntil) messages ,but when ever i tried to convert it to EXE using pyinstaller to onefile it ended up failing ,…
YCS VENOM
  • 1
  • 2
-1
votes
2 answers

Get a SIGSEV on a buffer overflow

I am attempting to create a buffer-overflow on a simple x64 C binary with all protections enabled (i.e. ASLR, canary, PIE, NX, Full RelRO - disabled Fortify). I am using an (updated) x64 Kali Linux 2020.3 distro (in vmware using the vmware image…
Kostas Letros
  • 53
  • 1
  • 11