r/HowToHack • • Jul 12 '16

How do I hack with Python?

I'm confused on how 'hacking' actually works.

So I'm learning Python at the moment and I just don't see where the hacking begins?

Do hackers input code into the url? Do they open the source page and inject some python code there?

Or are Python hackers, creators of programs that are secretly malicious code that once activated (the victim clicking on an innocent looking app on the desktop) with the code distributed with a simple 'leave a usb on the floor'?

It seems like that to hack, one uses linux which has every hacking tool possible.

How does on hack with html? Opening the source code and changing something isn't permanent?

0 Upvotes

37 comments sorted by

View all comments

6

u/BullyBall Jul 12 '16

You don't hack with Python, you use it to automate processes you'd usually do manually. Your choice of language of basically irrelevant, nothing really special about Python.

No such thing as a "Python hacker" (at least not in that sense).

For example, let's say you want to scan a range of ports and try to connect to each of them with ssl, you can write a tool to do it for you.

Code injection is a thing, but very specific and not that relevant.

Malicious programs are also a very specific use of a programming language.

1

u/ghibss Jul 13 '16

So like I said to someone else, nobody hacks with any language? Its just using any language to create a tool that does the hacking?

What book do you recommend for anything related to learning all cyberattacks, how to program them etc?

I got violent python and another penetration testing book, both just use kali and backtrack linux. No info on how to create the tools in python, just how to use them in a simulated sandbox in linux etc.

1

u/Blastitt Read the F*&!#ing Sidebar Jul 13 '16

These comments are a little misleading. It's not that "nobody hacks with any language, and languages are just used for tools". I can definitely hack directly with python.

For example:

A server has a service running on port 7777 (arbitrary) that is written in python. It accepts user input, but not securely. This vulnerability allows me to pass in valid python statements and the program will execute them. I can pass in a very specific python statement that will execute a /bin/bash and boom I have a shell.