High-level dynamic language developed by Guido van Rossum, particularly popular for server-side web programming and scripting.

learn more… | top users | synonyms

0
votes
0answers
19 views

Implementations of the Slow Loris Attack

I have been trying to implement this attack for my Apache server with Python for my security issues. For each new connection I'd send GET / HTTP/1.1\r\nHost: MyServer\r\nUser-Agent: Mozilla/5.0 ...
0
votes
3answers
87 views

How does Nessus send remote commands on Windows without RDP? [on hold]

I would like to know how Nessus sends remote commands on Windows. I have a scan with credentials launched on a Windows machine without RDP enabled, and Nessus can launch commands (.audit with the item ...
1
vote
1answer
24 views

Double socket connection

I'm busy experimenting with TCP socket connnections. I have made a client SOCK_STREAM socket andi've got a few questions: Is there any way that a streaming(TCP) socket can get data from another ...
-1
votes
2answers
39 views

How can I detect mode interface of other machine is promiscuous [closed]

I have a project that is to protect my box from attack man in the middle arp poison. I should detect if interface mode of other machine is promiscuous. I must write script python or command linux.
4
votes
2answers
120 views

MongoDB Nosql injection in python code

Here is the code snippet for accessing to MongoDB. client = MongoClient() db = client.test_database collection = db.test # Get data from fields condition = form.getvalue('name') if condition: ...
-2
votes
1answer
69 views

Timsort python exploit [closed]

Is there an exploit for this bug for python's sort implementation? http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/
2
votes
1answer
47 views

How to fuzz service with sending bad data?

I am reading a post about fuzzer in Python, here is the code: # Import the required modulees the script will leverage # This lets us use the functions in the modules instead of writing the code from ...
5
votes
1answer
68 views

How to to make a file private by securing the url that only authenticated users can see

I was wondering if there is a way to secure an image or a file to be hidden when it is not authenticated. Suppose there is an image in my website which can only be seen if that user is authenticated. ...
1
vote
1answer
77 views

HMAC + AES to guarantee secrecy and integrity?

As an exercise, I am writing some code that accepts a list of possibly secret properties (e.g. user ID, password, IP address), adds a timestamp, encrypts it, and signs it. Here's a high-level ...
0
votes
2answers
81 views

Python 2 or 3 for offensive security? [closed]

I have decided to set my sights on the OSCP Certification and, after reading multiple reviews I've decided to take Abraham's advice to heart and sharpen my axe. I have experience with Shell ...
0
votes
1answer
64 views

what are potential security risks of a python script outside public_html folder

I would like to know the risks of a python script that is outside of public_html application/scripts/myscript.py public_html This script is called by the php application asynchronously. it receives ...
-1
votes
1answer
537 views

Writing keylogger and viruses in python [closed]

So recently I have been working on some projects one of them is keylogger and the second is SYNflood (both in python). I want to know if ,is it a good practice to use python language for such ...
1
vote
2answers
142 views

Python security hardening

I’m working for a large organization which is using some Windows products that require python to work. Python is used to execute built in utility scripts and the user never recognizes that python is ...
1
vote
1answer
110 views

Unusual design aspects of AWS HMAC-based authentication, v4

I am designing a RESTful API in python. I want to use HMAC authentication. I could not find any suitable HMAC libraries, so I am rolling my own. However I want to use a well-known standard such as AWS ...
2
votes
2answers
56 views

Running untrusted Python code

I have a small OpenWRT router, on which I wish to run a daemon which is a python script. However, even though it is open-source and plain Python, I still don't trust it and I would like to isolate it ...
0
votes
0answers
66 views

Secure password transfer from stdout to another window

I am currently trying to build a little, secure password manager. As of now, I've implemented the encryption. Each website has its own file and each file has a number of fields (Most commonly username ...
2
votes
0answers
64 views

Assembly decoder with jmp-pop-call technique

This is a part of code in which I cannot figure out the mistake. I am using the jmp-pop-call technique and what I get is "Segmentation Fault". Tried to use GDB but things are really vague. Each byte ...
2
votes
4answers
168 views

A secure way to encrypt a connection between 2 clients securing against both passive and active adversaries

Recently I got interested in encryption and the methods behind them. So for a fun / school project I am building a program in python to encrypt data between two clients (chat and files). I'm just ...
0
votes
0answers
99 views

Why is the public key extracted from the CSR different than the one extracted from the associated certificate?

I am playing around with pyopenssl. I am trying to extract the public key from a CSR and to check if it is the same than the one I find in the associated certificate. There is a small difference ...
4
votes
3answers
254 views

Best way to store/retrieve sensitive key files?

We have our web servers running in AWS EC2. We have about 30 API Keys/passwords/etc (sensitive data) which is set in the environment for our app to use. Whenever we deploy, we start a new server ...
0
votes
2answers
155 views

If perl/python is not guaranteed to be installed on a target system why are those scripts useful to hackers?

If you don't install perl/python on your system then hackers can't use it (or they would make themselves obvious if they installed it)? I am just trying to understand why these languages are ...
3
votes
2answers
312 views

Principal DOM Based XSS detect using python

I am working for a project make a XSS scan tool using python. I have a sample url: http://www.foo.bar/index.php?ids=111 I've found that it has a vulnerability by ...
19
votes
2answers
2k views

Are python's popen (and similar) functions affected by Shellshock?

Basically which python's functions trigger bash (and might be impacted by shellshock), and which don't ? I have come up with this question by seeing in some scripts the popen() function. My question ...
2
votes
1answer
334 views

Python implementation of AES and SHA256/512 that are FIPS-140-2 validated?

For security purposes I need to use AES encryption and SHA256/512 in my Django/Python project. I know there are various libraries out there that provide different encryption methods but I can't seem ...
0
votes
1answer
151 views

Are shell scripts / bash inherently less secure than other (script) languages such as python?

Are shell scripts / bash suitable for any kind of task as long as the developer(s) write correct, security bug free scripts? Or are shell scripts / bash less advisable for some tasks such as parsing ...
1
vote
2answers
530 views

PyCrypto Possible To Check If File Already AES Encrypted?

import os, random, struct from Crypto.Cipher import AES def encrypt_file(key, in_filename, out_filename=None, chunksize=64*1024): """ Encrypts a file using AES (CBC mode) with the given ...
0
votes
1answer
215 views

How safe is virtual box without internet [duplicate]

I am running a windows 7 virtual box without internet connected. Internet is, however, connected to the host, and I allow any internet access to and from the host. On the guest platform I am working ...
0
votes
2answers
461 views

Identifying HP Printers with NMAP and then using results in Python/Perl

Great write up on network printer hacking at IronGeek's site here for anyone interested http://www.irongeek.com/i.php?page=security/networkprinterhacking. Here's what I want to do: Scan the subnet ...
0
votes
2answers
91 views

securely storing password in a file

I am working on making a log file for a small application. If an error occurs in the application then I have to send a mail to a person. I've figured out the code to send a mail to a person, but I ...
5
votes
1answer
1k views

Django SECRET_KEY security, how are methods more secure

I am nearing a point where I will deploy my Django application to the hostile environment otherwise known as "the internet" and I'm trying to better understand the ramifications of the Django ...
0
votes
1answer
204 views

Python SSH vs SSL? [duplicate]

I read the What is the difference between SSL vs SSH? Which is more secure? , and it mentions there is the possibility they can be affected by similar attacks. Now that the heartbleed thing is out, ...
2
votes
2answers
3k views

Can you write OS-related virus using high level languages like Python

It is a well known fact that OS-related viruses are commonly written in low level languages like C or C++ which require direct access to the kernel of the CPU , I am just wondering if its possible ...
1
vote
1answer
1k views

Explain the Heartbleed Python code [closed]

first post here so be gentle please! I understand the Heartbleed vulnerability concept, and I have a general grasp of Python. I'm struggling to understand the PoC Python code though, so was after a ...
3
votes
1answer
800 views

Using client certificates for website authentication

I was wondering if there currently exists a Content Management System that supports PKI and client certificates for website authentication instead of username/passwords. If not, what's a good place to ...
2
votes
2answers
1k views

buffer overflow in python script

I am developing a script to perform an a buffer overflow for an assignment in school. However, I am stuck at a point where my payload works injected through the commandline, but not injected through ...
1
vote
2answers
192 views

File encryption for a storage API

I'm implementing a Dropbox-like API, and one of my requirements is to have the files stored encrypted on the server. It is not required that the files are made unreadable by the server, only that they ...
1
vote
1answer
150 views

MITM Attacks with Web GUI

I'm thinking of writing an application that communicates sensitive information (using Python, if that's relevant). Instead of using the standard GUI libraries (like GTK, Qt or wxWidgets), I was ...
0
votes
1answer
401 views

veil framework, reverse https and tcp payload differences

i'm using veil framework to bypass av, when i want to choose a payload there are many choices, there is rev_https_contained , python/meterpreter/rev_https and c/meterpreter/rev_tcp my question is ...
3
votes
1answer
146 views

Protecting <a href='{{ my_model.some_url }}'> in Django

In my Django template, I have a link like this: <a href='{{ my_model.some_url }}'> The some_url bit is a Django URLField that a user can influence. Can this be exploited in any way? (What ...
1
vote
2answers
577 views

Python exploit question?

Can someone please explain how and why this struct.pack code is used in the below exploit? I'm trying to understand how it triggers the vulnerability. I understand the buffer overflow aspect, I'm ...
1
vote
0answers
145 views

How secure is a Python Pyro daemon for storing a password?

I am using the Pyro package to create a daemon which will, upon startup, prompt for a password, and then the daemon will store that password as long as it is running. Other scripts will then make a ...
1
vote
0answers
80 views

Scapy capturing Dot11 headers windows

Is it at all possible to capture Dot11 headers under Scapy in Windows? I'm thinking Winpcap, but I'm not sure how I'm supposed to do that. Any clues?
0
votes
1answer
220 views

Using buffer overflow on word with macro injection

I know how a buffer overflow works on a local network against an application running on a TCP port, assuming it doesn't drop the connection, but I would like some advice on an "exploit" I would like ...
0
votes
1answer
527 views

I got a python script decrypted out of a pcap from a botnet [closed]

I got a python script decrypted out of a pcap file it's communication from a botnet (proberbly the c&c) but when i start the script i ain't getting login or passwords. What does this script do? ...
2
votes
1answer
155 views

After having confirmed a computer is infected by a Botnet.

And having found a server IP that is controlling it. How can I find out the log-in credentials this client uses to log in to a IRC channel / server webpage / control panel. I have found out a python ...
1
vote
2answers
686 views

Learning to script tools in Python and general Pen Testing

I want to learn Pen Testing and already know Java and have been learning Python and am fairly comfortable with Python syntax. I also have some knowledge on Linux and TCP/IP. My questions are: How can ...
2
votes
1answer
3k views

Create netcat listener and execute reverse shell in the same script

I'm coding an exploit in python that exploits a command injection vulnerability for a CTF and I'm wondering how could I start a netcat listener and then send the payload to the remote host and once ...
3
votes
1answer
1k views

Hiding backdoors in Open Source code in other languages than C and C++?

I am referring to The Underhanded C Contest and Hiding Backdoors in plain sight. They demonstrate, that you can with some cleverness, write Open Source code, publish the code and hide a backdoor in ...
4
votes
2answers
543 views

How to implement client side encryption for CalDav & CardDav content?

I'm looking for a client-side encryption implementation that would be able to secure CardDav & CalDav data so that they couldn't be compromised even by the hosting provider. Server side: PHP or ...
0
votes
1answer
104 views

Is there any reason to allow Python fetches of my Web server's pages?

I keep seeing "python-requests/1.1.0 CPython/2.7.4 Linux/3.8.0-19-generic" requests e.g. from Amazon's servers of my website. It's kind of creepy. Who would set up an Amazon server to scan websites? ...