Is it possible to hack with javascript? [closed]

I’m familiar with the term hacking. Although i never will become one of those hackers who scam people or make trouble, i believe it’s an essential aspect any person who calls themselves a programmer must be able to do, as it is mainly about problem solving. But how does it work? When those people hack games or websites or the guy who hacked sony, do they use a programming langauge like ANSI C or c++ or assembly. Assuming they use a programming language, would it be possible to use javascript to hack in the same way you’d use any other language to hack. Furthermore, what do you have to do to be able to hack too. I just wanna know how it works, and the theory behind it all.

Hacking is unique every time. Exploiting some types of vulnerability doesn’t require any particular language at all. Sometimes you hack whatever’s there, in whatever language or form you find it. Sometimes it’s necessary to automate part of the process, for example password cracking, for which you can use any language you like.

Cracking a commercial game commonly involves studying its disassembled machine code, figuring out which part does the CD or license check, and surgically replacing a few bytes of the code such that the check is skipped.

Hacking a website commonly involves discovery of some small clumsiness on the part of its developers, which allows viewing of should-be private data, or permits execution of custom code if it does not sanitize data properly. SQL injection is a common flaw when values sent to a database are not properly protected within quotes (“…”) and so you can give values which break out of the quotes to execute your own commands. Cross-site scripting is a type of hack that uses JavaScript: If a website blindly takes parameters from the URL or submitted form data and displays them on the page without safely encoding them as text (worryingly common), you can provide a <script> tag for execution on that page. Causing someone to visit such a URL allows execution of scripted actions on their behalf. Code injection is also possible on the server side with PHP (or Perl, or similar), if sloppy code gives access to an eval-like function, or if server misconfiguration allows user-uploaded files to be interpreted by the server as scripts.

Read More:   Convert data file to blob

Hacking into an operating system or server program remotely may exploit bugs in its handling of network commands. Improper handling of malformed network commands can cause it to bungle user authentication checks or even to directly execute code provided in the network packet, such as via a buffer overflow.

Bugs in web browsers, plugins, and document viewers are similar. What should be safe types of file can be crafted with non-standard or broken values. If the programmer forgot to handle these cases safely they can often be used to escape the normal limits of the file type.

Viruses can also be slipped onto a machine via physical exchange of USB stick or CD or convincing someone to install virus-laden software. Such viruses are often written anew for each purpose (to avoid anti-virus software), but there are some common ones available.

Weak or badly implemented encryption can permit brute-force decoding of encrypted data or passwords. Non-existent encryption can permit wiretapping of data directly. A lack of encryption can also permit unauthenticated commands to be sent to a user or server.

Very obvious passwords, or unchanged default passwords, may allow simple guesswork to get into a system. Some people use the same password everywhere. This give websites the power to simply walk in to a user’s email account and then take control of everything associated with it. It also means a password leak on one insecure website may be used to access accounts on many other websites.

And sometimes, “hacking” is social engineering. For example, imagine phoning up a junior employee and pretending to be someone in charge, to trick them into revealing internal information or reset a password. Phishing emails are a common, semi-automated form of social engineering.

Read More:   Google chart redraw/scale on window resize

Breaking into a system is rarely just one of these steps. It’s often a long process of analyzing the system, identifying minor flaws and leveraging them to see if a useful attack vector is exposed, then branching out from that to gain more access.

I’ve never done it, of course.

There is a sort of “hacking” possible with javascript. You can run javascript from the adressbar. Try typing javascript: alert("hello"); in your address bar while on this website.

This way it it possible to hijack local variables, cookies for instance.

But since javascript runs on the client-side. People would have to use your workstation in order to gain access to your cookies. It is a technique that can be used to alter login data and pretend to be somebody else (if the site had been badly built).

If you really want to learn more about this there are some ‘javascript hacking lessons’ that can be found here:

Side note, there is a difference between hacking and cracking. Reference:

There are many exploits that can use javascript, probably the most well-known is going to be cross-site scripting (XSS).

To follow up on Michael’s answer, it is good to know the vulnerabilities in software and how people exploit those vulnerabilities in order to protect against them, however hacking is not something you want to be known for.

For a start, you are actually referring to what is known as Cracking, not hacking. This question will surely be closed, however some brief observations ^_^

Read More:   How to remove and clear all localStorage data [duplicate]

Cracking comes from a base level understanding of how computer systems are built, hence you don’t learn how to crack/hack, you learn about computer engineering in order to reverse-engineer.

A popular platform for hacking is Linux; over windows for example as its open source so experienced programmers can write their own programs. Although experienced hackers can accomplish their goal on any platform.

There are many levels of hacking however, simple website security is worlds apart from hacking in to Sony and facing jail ^_^

You may have some fun on though

It depends on many things, for example: how the html code is structured, for example, I don’t know if you could hack an iframe, but a normal web-page would be relative easy to hack. Another security pitfall programmers usually do is passing sensitive information via url query-string, then you could get those pieces of data and submitting them wherever they are used in the html code.

There could be another details, but I don’t figure them out right now.

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Similar Posts