News: 1648130406

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Hackers weigh in on programming languages of choice

(2022/03/24)


Never mind what enterprise programmers are trained to do, a self-defined set of hackers has its own programming language zeitgeist, one that apparently changes with the wind, at least according to the relatively small set surveyed.

Members of Europe's Chaos Computer Club, which calls itself "Europe's largest association of hackers" were part of a pool for German researchers to poll. The goal of [1]the study was to discover what tools and languages hackers prefer, a mission that sparked some unexpected results.

The researchers were interested in understanding what languages self-described hackers use, and also asked about OS and IDE choice, whether or not an individual considered their choice important for hacking and how much experience they had as a programmer and hacker.

How are CCC hackers hacking?

To be fair, the survey only had 43 respondents, so it's too small to allow for representative conclusions, but even with a tiny sample, they note the results "add to the extremely scarce literature on the subject. The approach could serve as a model for future surveys, possibly at international level," the paper said.

The experience of respondents gives the survey more weight, though. Nearly three-quarters said they had five or more years of experience as a hacker, and 93 percent have five or more years of programming experience.

[2]

As for which programming languages the hackers from CCC prefer (respondents could choose more than one answer), it appears that Bash/Shell/PowerShell are the most popular, with 72.5 percent saying they've used it to hack in the past year. The next most popular is Python, with 70 percent saying they used it for hacking in the past year.

[3]

[4]

For those arguing that Bash isn't a programming language, the researchers understand. However, "we have included them in the list anyway to avoid possible gaps in the study," the paper said.

Beyond Python, language use drops off dramatically: C, the next most popular, was only used by 32.5 percent, as was JavaScript. HTML/CSS was used by 30 percent, C++ by 27.5 percent, Go by 22.5 percent, and the list goes on.

[5]UK Ministry of Defence takes recruitment system offline, confirms data leak

[6]IT outage at Scotland's Heriot-Watt University enters second week

[7]F-Secure spins out new enterprise security business: WithSecure

[8]VMware fixes command injection, file upload flaws in Carbon Black security tool

Unsurprisingly, 95 percent of respondents said they used a Linux-based OS for hacking in the past year, while only 40 percent used Windows, 32 percent used macOS, and 17.5 percent used BSD. IDE choice was similarly concentrated, with 60 percent saying they used Vim and 50 percent saying they used Visual Studio Code.

What the numbers mean

At the heart of the study is the question of what programming languages hackers use, from which follows an additional question: is that language an important part of your hacking process? The results suggest no.

Only 25 percent of respondents said that they agreed or strongly agreed with the statement "The choice of the programming language is important for hacking." Otherwise, 32.5 percent said it didn't matter, and the remaining 42.5 percent said they disagreed or strongly disagreed that language choice was important.

[9]

From that, it seems the definition of hacker that the paper puts forward, "someone who uses his/her technical expertise to deal with computers with special regard to their security," means hackers are more interested in the process of hacking than the particular language used to do it.

It also indicates that "the prevalence of Python for hacking might therefore simply reflect the general increase in its use in recent years," the paper said. "Consequently, one could expect that the language preference of hackers will continue to change in future as technology evolves." ®

Get our [10]Tech Resources



[1] https://arxiv.org/abs/2203.12466

[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Yjyjv7CT1rJxCx9lsRGpwAAAAFQ&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Yjyjv7CT1rJxCx9lsRGpwAAAAFQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Yjyjv7CT1rJxCx9lsRGpwAAAAFQ&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[5] https://www.theregister.com/2022/03/24/ministry_of_defence/

[6] https://www.theregister.com/2022/03/24/heriot_watt_outage/

[7] https://www.theregister.com/2022/03/24/fsecure_withsecure/

[8] https://www.theregister.com/2022/03/23/critical_bugs_vmware_carbon_black/

[9] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Yjyjv7CT1rJxCx9lsRGpwAAAAFQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[10] https://whitepapers.theregister.com/



Hmmm

Chris Gray 1

So, a language is successful if hackers use it?

Hacking is an activity with different requirements from other programming activity, so one would expect the language preferences to differ. Hacking, I expect (not something I've ever been interested in doing) involves quite a bit of file manipulation and command execution, so more "typical" programming languages wouldn't be terribly useful. Perhaps in the past Perl rated higher?

Re: Hmmm

fidodogbreath

So, a language is successful if hackers use it?

Sort of like how imaging technologies become successful when porn uses them (8mm, VHS, streaming video, etc.)

I'm inherently wary of self-identifying "hackers"

JimmyPage

It reminds me of the 1980s and Prestel for a start.

It also feels a little too close to "influencer"

Re: I'm inherently wary of self-identifying "hackers"

Arthur the cat

For an old fart like me, a hacker is simply someone who gets things done, by any means possible, especially if it's regarded as difficult or forbidden.

karlkarl

Many proof of concept scripts seem to be written in Python (perhaps because it is quick and dirty?). However I imagine many hackers (and crackers) are extremely proficient in C, C++. Mainly because they must be in order to identify buffer overflows and things like that.

Many probably are familiar with assembly (incl a number of different architectures) too, at least via disassemblers, tools like Radare2.

Horses for courses

Peter Gathercole

The reason why Perl and Python are used is because if you get a foothold in a system enough to drop a text file off and submit it to any sophisticated interpreted language, Perl and Python (amongst other capable languages) allow more access to network and OS facilities than a normal shell.

It is quite possible (and I have done it) to write things like packet and message forwarders in a language like Perl, opening a port on the outside interface of a system, and shuffling packets to the internal networks. And this is just the tip of the iceberg.

This is not possible using something like ksh88 (although it may be possible in ksh93, with it's dynamic library linking).

The thing about interpreted languages is that you don't need to know the underlying architecture of a system, or rely on a compilation system on your first foothold, in order to perform sophisticated attacks. The high-function interpreted language give you all the facilities you need.

Where hackers use C++ and other compiled languages is for external attack tools like port scanners and brute force tools. But, in order to use such languages to run things once you are in a system, you have to either know in advance the internal architecture of a system so you can compile commands in advance, or use a resident compilation tool on that system, something that should never be allowed on a system on a boundary.

I'm sure there have been multi-layer attacks that have gained a foothold, inserted precompiled tools such as a minimal compiler, then sent programs through to compile in situ, but it's easier just to use something like Perl if it's on a system.

If it were possible, I would completely ban high function interpreted language runtimes on boundary systems in an environment, but nowadays, so many admin tools rely on these runtimes that it's just not possible.

Who wrote this survey?

Peter Gathercole

I disagree with the survey in a number of respects.

The UNIX Shell and Bash are programming languages, albeit rather specialized ones that rely on, and manipulate other external tools. But it is possible, and I have, written programs just using the shell itself, without calling other tools (you do this when trying to work out what is wrong with a system unable to launch other programs). It's rather a hair-shirt experience, but it is possible.

But I doubt that a shell us used for much more than marshaling other tools when people are hacking systems. It may be the first level of automation available to a hacker, but it's extremely unlikely that a shell script itself will be the active tool performing any hack (at least not unless there are stupid mistakes made by the administrators).

But I would wonder who in their right mind would define Vim as an Integrated Development Environment (IDE)? It's a sophisticated editor, but as far as I know, it's not even as integrated as electric-c-mode and the multi-buffer compilation system using make in Emacs. At least in Emacs, you have assists that allow you to capture the errors from a compilation, and then parse them to take you to the relevant line in the source, and even use the Grand Unified Debugger mode for using something like dbx.

A quick scan did not find anything like this available for Vim.

Re: Who wrote this survey?

John69

Those who think bash is not a programing language may not have read the article on wordle in bash https://www.theregister.com/2022/02/02/bash_wordle/

Re: Who wrote this survey?

TimMaher

I have used Vim since it was vi.

It is very definitely not an IDE.

I was surprised that it was even mentioned as such.

Netbeans, Idea & Android Studio, Eclipse, Visual Studio, XCode. I use them all in varying degrees but just use Vim and TextWrangler as shell editors.

Have a beer for commenting before I got to it!

Re: Who wrote this survey?

Jwdb

You don't use it as an IDE, but it can be turned into an IDE piecemeal via plugins if desired. For example, I recently discovered that there are plugins for VIM that support Visual Studio's language server protocol, giving you features like instant syntax checking, documentation, and completion. Not easy to set up, and not necessarily always worth it, but I've found the Haskell one quite useful.

Re: Who wrote this survey?

karlkarl

If you go back to DOS, where IDEs seem to have gained a foothold (due to the platform lacking any multi-tasking so it did need to be "all-in-one") and compare Vim with Borland Turbo C and it's cult classic IDE; I don't see too much in it in all fairness.

Then compare this with Watcom Vi (of the day) and there is a clear difference.

In many ways that is why I prefer (n)vi and tmux for my work because Vim does feel a bit too heavy.

93 percent have five or more years of programming experience

Arthur the cat

As someone who learnt to program 50 years ago next month, colour me unimpressed.

[Icon is nearest to crumbling old wreck.]

Re: 93 percent have five or more years of programming experience

TimMaher

I only have 43 years so have an upvote.

Re: 93 percent have five or more years of programming experience

Anonymous Coward

Can we Noobs play too?

COBOL, 32 years ago. I still have my copy of "Structured Cobol" published by McGraw Hill, 1986 edition.

Re: 93 percent have five or more years of programming experience

LionelB

Only 47 here (Fortran 66, coding sheets, punched cards).

Have a beer - but only the one, or you'll be up all night.

Re: 93 percent have five or more years of programming experience

Arthur the cat

Have a beer - but only the one, or you'll be up all night.

Pro tip: if your doctor puts you on a diuretic, ensure you take it in the morning rather than mistakenly taking it just before going to bed. The latter will ensure you understand that "up all night" has a very different meaning from when you were a young man.

Re: 93 percent have five or more years of programming experience

rzzzwilson

Newbies! I learned to program on an IBM1620 with FORTRAN 2 in 1969, so something like 53 years ago. :)

Re: 93 percent have five or more years of programming experience

heyrick

Upvote because I'm 48 and started when I was 12, so "relatively young" but... Good grief, five years? That's "still in nappies" isn't it?

To be fair, the survey only had 43 respondents

Howard Sway

Are they sure? A real Hacker would have entered many times, and had some fun with the responses given too.

But using Javascript / HTML / CSS apparently makers you a "hacker" these days, or at least it does in the eyes of 30% of those who consider themselves to be one. As another old fart who's been coding for about 40 years, I'm detecting a few wannabes amongst these responses, unless of course the results have actually been hacked. But I doubt this - I would be expecting to hear that 75% are using INTERCAL or Brainfuck if they had the true hacker mojo.

heyrick

Shell first, then Python, then C, then HTML , then C++?

It's quite clear from that that hacking has some rather specific requirements that are, shall we say, less likely to be encountered in the workplace.

Plus, anybody who has ever met a hacker (as in the type that walks through security like it isn't there, rather than the tinkerer type) knows that they don't refer to themselves as hackers. They don't refer to themselves at all. Experienced hackers don't need to prove anything, and certainly not share it with others.

How did I meet such a person? Noticing the use of an acoustic modem with a laptop and a public phone (note - about twenty odd years ago). Talking to her (yes, a her), she was also well aware of all the security cameras in shops and knew this one place was a blind spot. Beyond that, she said nothing. Never saw her again either.

You are going to have a new love affair.