❌

Reading view

There are new articles available, click to refresh the page.

CUDA Basics for Hackers, Part 1: Getting Started

Welcome back, my aspiring cyberwarriors!

I think it is abundantly clear by now that the future of cybersecurity depends upon AI. This is the reason we are offering the Wittgenstein Award for the best AI cybersecurity agents. It is also the reason we are offering a series of tutorials and classes in using AI in cybersecurity.

As you know, most of the AI models run on NVIDIA GPU’s. These graphics processing units are unique in that they can process thousands of threads simultaneously (your CPU can run (4-16). These means that a GPU can do calculations on many processes at the same time, perfect for generating the graphics in your favorite game.

Artificial intelligence or large language models (LLMs) use neural networks to calculate the best answer to your prompt. Each token (~word) is chosen by the probabilities that it is the right token in the right order. This requires calculating probabilities simultaneously for thousand or even millions of tokens. This where the NVIDIA GPU’s come in.

Many years ago, NVIDIA developed a system they call CUDA or Compute Unified Device Architecture for running general purpose applications on a GPU. It is CUDA that nearly every AI developer started with and why NVIDIA is the GPU of choice. CUDA is perfect for running operations on many pieces of data simultaneously. It’s ideally suited for tasks where the work can be broken into many independent pieces and run the calculations in parallel such as image processing, deep learning, or even password cracking.

The code of any application that executes on the GPU is referred to as device code and those functions are referred as kernels. When a application launches a kernel, it launches many threads. These threads can number as many as millions. These threads are grouped and organized into thread blocks and these thread blocks are organized into a grid. These thread blocks are all exactly the same size with the same dimensions.

Since CUDA is such a key element of artificial intelligence development, we thought you should know at the least the basics of CUDA. This is the first of a series on using CUDA.


Step #1: Getting Started

Before we begin, let’s discuss the pre-requisites.

First, you need a NVIDIA GPU with CUDA support.

Second, as with any compute intensive task or cybersecurity, in general, I strongly recommend you use Linux (see my book, Linux Basics for Hackers from No Starch Press). Ubuntu or Debian is recommended (Kali Linux is Debian).

Third, you need to install the CUDA toolkit.

kali>sudo apt install nvidia-cuda-toolkit -y

Just like creating compiled programs in Linux with gcc, you will need the CUDA compiler or nvcc. You can check to see whether it is already installed by entering:

kali > nvcc --version

If you system responds with the nvcc version, the compiler is installed and we are ready to start!


Step 2: Write the CUDA Program

NVIDIA’s CUDA C++ is an extension of standard C++ designed for using the power of the GPU. Those of you comfortable with C++ should find CUDA C++ familiar and easy to work with. For the rest of you, pay close attention.

Let’s begin by creating a new file called hackers_arise_vector_cuda.cu (note the .cu extension).

Copy this program into that file.


Step 3: Compile the Code

Use the NVIDIA CUDA compiler or nvcc:

kali > nvcc hackers_arise_vector_cuda.cu -o myfirstcuda.cu

If you don’t see an error, your program has compiled successfully and is ready to run as myfirstcuda.cu (all CUDA programs use the .cu extension).


Step 4: Run the Program

Next, let’s run this simple CUDA program.

kali > ,/myfirstcuda.cu

Your output should look something this.


Step 4: What Happened?

Now, let’s look at what happened in our program.

In the first line, the code includes the C++ iostream that runs on the CPU providing standard in and standard out. In the second line, the code includes cuda_runtime.h which is the primary header file for the CUDA Runtime API.

Next, we create a CUDA kernel function that can run on a GPU. the __global__ indicates that this function can be installed from the CPU and run in the GPU.

Our program then calculates the global thread ID.

Next, after boundary checking, we generate the array size and then allocate memory on the host CPU.

Then, we initialize the host (CPU) arrays with sample data.

Next, we allocate memory on the device or GPU.

Then we copy the data from the host CPU to the device, GPU.

Next, we define the execution configuration (threads and blocks). In this case, we are designating 256 threads per block and then calculate how many blocks we need.

Next, we launch the kernel on the GPU using multiple threads

We need to wait for the GPU to complete it’s work before trying to access on the CPU.

Then we copy the results from the GPU to the CPU.

Next we verify the results by sending the first 5 values to standard out.

Finally, before we leave, we need free up the memory.

Summary

CUDA or Computer Unified Device Architecture is a framework developed by NVIDIA to fully utilize the strength of GPU’s. It use an extended C++ (as well as Python) to convert the problem in to a multi-threaded application. It is this framework that makes NVIDIA GPU’s the first choice for AI developers.

CUDA can also be used for many applications in cybersecurity including:

  1. Password cracking and brute-force attacks
  2. Real-time threat detection
  3. Phishing and Malware Analysis
  4. Post-Quantum Cryptography
  5. Network Graph Analysis.

As this world transitions to artificial intelligence, stick to Hackers-Arise for the latest developments and techniques including the awarding of the Wittgenstein Award in 2027 for the best cybersecurity AI agents.



The post CUDA Basics for Hackers, Part 1: Getting Started first appeared on Hackers Arise.

The NVIDIA AI Ecosystem: A Quick Guide

Welcome back, my aspiring cyberwarriors!

Many aspiring cyberwarriors write to me asking where they should start in artificial intelligence for cybersecurity and the answer is simple, Hackers-Arise! We have dozens of tutorials–and now classes– on how to apply AI to cybersecurity. In addition, we are the sponsor of the upcoming Wittgenstein Award for the best AI cybersecurity agents. This will give our students an inside look at the development of the best of the best in AI cybersecurity as our students will have an opportunity participate and use the models and agents we develop.

Beyond learning AI for cybersecurity, there is another issue. There are many platforms, models, and hardware to choose from. Comparable to Cisco at the advent of internet in the 1990’s, those who hitched their wagon to Cisco found themselves in an advantageous position regarding jobs and promotions. I want to make the case that NVIDIA is the company you should be hitching your wagon to in this new era.

As you know, NVIDIA is the most valuable company in the world! It is rapidly growing an eco-system that will exceed that of Apple and Cisco. They have quietly built an eco-system of AI that will make it very hard to dislodge them from this dominant position. Jensen Huang and NVIDIA are building an almost impenetrable wall around their eco-system assuring it will be here for years to come.

NVIDIA began as a start-up 1993 building graphics processing units (GPU) for PC gamers. Processing pixels for any graphics intensive product is very compute intensive and NVIDIA made those games come alive. Graphics processing is compute intensive as every image is made of millions of tiny polygons that the GPU must compute it’s size, color, and movement. This means crunching a vast amount of data and Jensen Huang and his colleagues developed a graphics card capable of doing all those calculations very fast through massive parallelism. GPU’s have thousands of cores capable of doing these calculations serially and simultaneously. That is the magic of NVIDIA GPU’s and it is what makes NVIDIA GPU’s the preferred chip for AI. Neural networks–the foundation of our LLM’s at this moment– are built almost entirely from matrix multiplications. This means that the same calculation needs to run over and over on different data. The NVIDIA GPU is uniquely designed for this.

Now let’s take a look at the NVIDIA eco-system that Jensen Huang is building in AI.

Major Equity Investments / Strategic Partnerships

Jensen Huang has made numerous investments in companies positioned to benefit from the coming age of AI, including:

Mellonox –in 2019 NVIDIA agrred to buy Mellanox, an Israeli maker of high-speed Infiniband and Ethernet interconnects for $6.9 billion. NVIDIA needed faster interconnects between to communicate to and from it’s super fast GPU’s and other hardware and Mellanox provided that.

ARMβ€” the British chip designer was the next firm in NVIDIA’s cross-hairs. Jensen Huand recognized that needed powerful and efficient CPU’s to manage his systems. ARM designs RISC-based CPU’s that power the mobile world due to their unique combination of speed and efficiency. NVIDIA offered $40 billion to purchase ARM for what Huang called β€œthe world’s premier computing company for the age of AI.” The US FTC sued to block the acquisition and NVIDIA dropped it’s pursuit of owning ARM. Instead, it holds ARM and it’s CPU’s in close partnership integrating their CPU’s in a multitude of products. Interestingly, ARM is now worth about $250 billion, 6x what Huang offered for it just 6 years ago.

OpenAI β€” NVIDIA and OpenAI announced a letter of intent to deploy at least 10 gigawatts of NVIDIA systems, with NVIDIA intending to invest up to $100 billion in OpenAI progressively as each gigawatt is deployed. Earlier in 2026, OpenAI raised $110 billion at a $730 billion pre-money valuation, with NVIDIA and SoftBank each investing $30 billion and Amazon investing $50 billion. NVIDIA also noted in its 10-K ( a type of disclosure required by US regulators at the SEC) that it’s finalizing an investment and partnership agreement with OpenAI, though there’s no assurance the transaction will be completed.

Anthropic β€” NVIDIA and Anthropic announced a deep technology partnership to optimize Claude models for NVIDIA architecture and vice versa; Anthropic’s Series H in May 2026 raised $65 billion at a $965 billion post-money valuation, making it one of NVIDIA’s two largest single-company bets alongside OpenAI.

CoreWeave β€” NVIDIA holds a stake with an original 7% stake (24.2 million shares) worth roughly $2 billion at IPO, plus an additional $2 billion investment in early 2026, on top of a prior $6.3 billion agreement to purchase CoreWeave’s unused computing capacity through 2032.

xAI β€” A structure of $7.5 billion in equity plus $12.5 billion in debt, largely through a special purpose vehicle for GPU purchases, supporting xAI’s Colossus 2 data center in Memphis.

Hugging Face β€” A pending acquisition-related investment of $12.9 billion.

Mistral AI β€” NVIDIA remains an investor alongside lead backer ASML, with Mistral valued at €11.7 billion (about $13.8 billion).

AI Infrastructure Financing

In August of this year (2026), NVIDIA announced a partnership with some of the largest financial firms in the world including Apollo, BlackRock, Brookfield, Goldman Sachs, and KKR. This partnership was designed to facilitate financing of AI infrastructure and, of course, NVIDIA GPU’s.

Venture / Ecosystem Programs

A roughly Β£2 billion (~$2.6 billion) UK commitment flowing through partner VCs β€” Accel, Air Street Capital, Balderton, Hoxton Ventures, and Phoenix Court β€” into startups in London, Oxford, Cambridge, and Manchester.

Similar β€œVC Alliance” partnerships extended to European firms including Accel, Elaia, Partech, and Sofinnova, offering DGX Cloud Lepton marketplace credits to portfolio companies.

Scale

NVIDIA has committed over $50 billion across AI labs, cloud services, data centers, and optical communications, with private company assets reaching $47.9 billion by July 2026 and about $18 billion in equity commitments still to be executed.

This list isn’t exhaustive β€” NVIDIA also has long-standing commercial partnerships with cloud providers (AWS, Microsoft Azure, Google Cloud, Oracle), automakers, and chip/hardware partners that function differently from these financial stakes. Let me know if you’d like me to dig into any particular category.

Summary

NVIDIA and Jensen Huang have quietly built an almost impenetrable eco-system of artificial intelligence systems through acquisitions, partnerships, and financing. Similar to the eco-system CISCO built with networking equipment at the advent of the Internet, it will be advantageous to become part of this eco-system as it will likely be dominant for the foreseeable future.

The post The NVIDIA AI Ecosystem: A Quick Guide first appeared on Hackers Arise.

❌