• Question: Do you know how to hack if you know how to code?

    Asked by on 17 Jun 2020. This question was also asked by .
    • Photo: Sarah Lean

      Sarah Lean answered on 17 Jun 2020:


      Not necessarily.

      Not everyone that works within the IT industry knows how to code, there are a lot of jobs out there that don’t require you to code, my job being one of them.

      Also hacking, isn’t just about breaking into a system, it can also involve physical building security. Such as being able to get into a building undetected or cutting off the CCTV systems etc.

      IT isn’t all about coding and hacking isn’t all about coding.

    • Photo: Katy Brown

      Katy Brown answered on 17 Jun 2020:


      Nope! I know how to code and I have no idea how to hack. You would need to specifically know a lot about computer security and about how computer systems work. Lots of people who can code don’t know much about this at all

      Knowing how to code would be very helpful when learning how to hack though!

    • Photo: Martin Coath

      Martin Coath answered on 17 Jun 2020: last edited 19 Jun 2020 8:15 am


      Only if you do lots of research! Coding is just the start.

    • Photo: Ricardo Ramirez

      Ricardo Ramirez answered on 17 Jun 2020:


      It depends on how you define hacking. If you are interested on understanding how a software/network works, you don’t need to know beforehand how to code, but you will end up learning some of the principles when figuring out how things work. For example, if you look at the address on the top of this question (/coding20-zone/question/do-you-know-how-to-hack-if-you-know-how-to-code/) you can already figure out that somewhere “do-you-know-how-to-hack-if-you-know-how-to-code” identifies this question. Looking at other questions, you can start to get an understanding on how this website works. In a way, that is the principle of “hacking”. You start breaking down the small bits of a system until “you get it”. Of course, if you study a bit of how websites are done, you can get more understanding.

      On the other hand, most of the vulnerabilities in a system/organisation are humans. Most of the high profile hacks are done by fooling people to give away critical information, like a password. That is why there are so many quizzes on social media that try to make you give your birthday (a very common password or secret question). Again, hackers start making a profile of their targets.

    • Photo: Andy Smith

      Andy Smith answered on 17 Jun 2020:


      Coding is all about building a system. Hacking is all about finding flaws in a system or making it do something it was not designed to do. So no, just knowing how to code doesn’t mean that you can hack.

      Imagine a bank. The person who built the bank probably doesn’t have the skills to break into it to steal money. Although they might know some information which would be helpful, such as how strong the locks are or where the CCTV cameras are pointing.

      Also there is not one single way to hack a system. Again, think about robbing a bank. To get inside the building you might use the front door, or you might break a window. Then to get into the safe you might try to guess the code, or you might use a bomb to blow the doors open. It depends on what security measures the bank has in place. Alternatively you could instead just bribe a bank employee to steal some money for you, or trick them into giving you money from someone else’s account.

      The same is all true for computer hacking.

    • Photo: Emma Wilson

      Emma Wilson answered on 17 Jun 2020:


      Not everyone who knows how to code knows how to hack. I personally have no idea how to hack into anything.
      However, someone who has knowledge of computer systems may decide to gain a qualification in ethical hacking, so they can learn (and stay within the law). This can lead to careers where you are paid to find security flaws in websites.

    • Photo: anon

      anon answered on 18 Jun 2020:


      Some good answers here already. For me, it depends what you mean by “hack”. I have changed someone else’s executable code to put my own name in it, for example, by “hacking” the compiled and executable program. Not coding; hacking. But I am not a “hacker” in the sense of trying to get unauthorised access to systems for the purpose of making a profit, destruction or whatever. That requires not only a broad range of skills but also a set of motivations and (bad) morals that I don’t share and don’t want to share. So I’d differentiate between technical skill – do I know enough to be able to do this? – and motivation – do I want to do this? I work in computer security so my motivation is to do good. Some do take that further and “hack the bad guys”. Again, that’s about motivation (and sometimes necessity); happily I haven’t been put in that position. And to be honest, my skills today aren’t up to it anyway. I like the question – really made me think 🙂

    • Photo: Lucy Craddock

      Lucy Craddock answered on 18 Jun 2020: last edited 18 Jun 2020 12:19 pm


      Hacking and coding are very different skills. You may be able to better understand how to ‘hack’ as you will learn about computers as you learn to code. However, these are very different disciplines. Hacking requires a broad and deep knowledge of computer science, IT infrastructure, networking, web applications, etc.. Hacking is essentially finding the flaws of another system, and this can be presented in many different ways. It’s the limitations of a hacker’s knowledge as to how to find these and exploit them. Of course, you can use code to automate some of these processes. Word of warning: hacking another system without permission is illegal – please read up on legislation and the differences between white and black-hat hackers before pursuing this as a skill. Much of the unforeseen work of an ethical hacker is navigating and understanding laws, ethics, and codes of conduct.

    • Photo: Hannah Im

      Hannah Im answered on 18 Jun 2020:


      No to both, but in my last role, I managed a team of pen testers around the world whose job was to do something called ethical hacking – their objective was to try to hack into our most important corporate systems – both the systems before they were operational and after. I also have no idea how to code. The people I work are both technically brilliant and/or functionally amazing. People like me, who are functionally more geared, we figure out how we want things built and operated, and the technical geniuses do all the building. For success, we need a variety of talents, and I really appreciate those that other people have which are nothing like my own!

    • Photo: Anar Yusifov

      Anar Yusifov answered on 20 Jun 2020:


      Yes, but you never can hack anything. Your hacking starts from few “tricks” in your own programs to avoid some inconveniences. Then, after few years, you are capable to find some “hacks” around some programs which are not yours. Then, after few more years, you can hack systems outside of digital world. Then, after few more years, you can hack people’s minds… minds… minds… 🙂

    • Photo: Jane Kennedy

      Jane Kennedy answered on 22 Jun 2020:


      Hacking and coding need quite different skills. If you are a programmer, you can read all the code and documentation for the sytem you work on, so you should know how it works pretty well. If you’re a hacker, you can see the finished product, such as an app or a website, but the inner workings are hidden from you. A bit of investigation is required to find the weak spot you can use to gain access and take control of the system. As a result, coding knowledge is not enough on it’s own to become a hacker.

      On the other hand, amazing coding skills aren’t always needed to be a hacker. Often people are the weak spot in a system, which is why hackers will usually have an easier time tricking people into providing them their emails and passwords. There was a large cyberattack reported in Australia last week where it looks like the hacker used some code they copied off the internet: https://www.cyber.gov.au/threats/advisory-2020-008-copy-paste-compromises-tactics-techniques-and-procedures-used-target-multiple-australian-networks

      If you want to be programmer, I’d argue that understanding how the most common cyberattacks work is a very important skill, particularly if you are making applications that users will be able to interact with. This will help you design your own systems in a way that makes it harder for hackers to break them. For example, if you have username and password text boxes where the inputs are used to check a user database, you need to make sure the inputs are coded in a way that does not let people inject their own queries into your database – in case they try to get lists of all users and passwords, or delete your whole database!

    • Photo: David Corne

      David Corne answered on 24 Jun 2020:


      You don’t; most coders don’t really know how to hack. Hacking can be seen as a very specialised type of coding. Most coders can do a little bit of everything, but specialise in certain things (e.g. games, databases, machine learning, networking/comms, security, etc.). A hacker has a lot in common with a coder who has specialised in networking and security.

Comments