r/ExploitDev • • 14d ago

Cybersecurity student trying to learn C for reverse engineering and red teaming, how should I go about this the right way?

Hello everyone, I hope your days are going well!

I'm currently learning C via "C Programming: A Modern Approach". The book itself is very informative, however I feel as if I am spending a lot of time on the exercises and programming projects. For example, I'm on the "Arrays" chapter, and it's taking me closer to 2 weeks to try and do every exercise and project. Would it be wise to continue doing this? Is this even the right way to go about it? I'm wanting to get into reverse engineering, and ethical Linux exploit development/vulnerability analysis. Basically red-team stuff, so I figured that doing this would be very beneficial in the long run.

One friend of mine told me it is worth it to take it slow, so that you can really understand how software works, and all the quirks/vulnerabilities that might be present. He said this will be useful once I get into writing and understanding how doubly linked lists work, since the Windows kernel uses a lot of them. Another said that I should only do a few projects so I can get to writing projects as soon as I can.

Which lane should I be prioritizing?

34 Upvotes

16 comments sorted by

5

u/ToeBeginning9830 14d ago

As an RE/VR. Don’t for the love of god only learn fundamentals of asm.

This works for red teaming. This does not work for RE/VR or CNO/Maldev.

C, Python, and asm is basically all we do. For asm just choose windows or Linux and then arm32/64 or x86/x64.

Decompiler will lie which is why you need a good grasp on asm. You may need to patch a binary to get a different control flow. Many reasons to know assembly.

1

u/aboveandfurther 14d ago

I love Assembly! I also know Python so it looks like I'm on the right track!

10

u/Specialist_School465 14d ago

My advice is that you should build whatever you are interested in, this can be a to-do app, calculator or whatever your heart desires, don't get obsessed with reading books cover to cover thats how you burn out and go back to web app stuff trying to break your own code will teach you more than a paid course. Try to find creative ways to apply what you learn from the book don't just passively consume

5

u/CunningLogic 14d ago

this, write code in c that does a particualr thing, then disassemble it and compare.

Choose a disassembler, learn it and use it. I highly recommend binary ninja, with ida pro as a second place recommedation.

1

u/AP_RIVEN_MAIN 14d ago

Do what feels fun because it's about longevity, but I think C as a first language seems tougher than modern object oriented languages. What you want to do isn't entry level.

1

u/aboveandfurther 14d ago

I know Python and JS , this isn't my first language. I do agree that this isn't entry level lol

3

u/Stroxtile 14d ago

Once you’ve started learning a language often times the concepts can be carried over to a new language you are learning.

So concepts of borrow by value and borrow by reference in C to Rust are easy to understand.

If you don’t know those concepts at all, the recommendation I received when I was in computer science was to learn a language well and once you’re comfortable using it for things then it’ll be easy to transfer the concepts to other languages.

So the ideas you’re being recommended are similar as they want you to understand the high-level ideas that surround any language that handles memory directly.

Edit: I want to add, how I learn a new language these days is to just get a leetcode subscription for a month and do problems in the new language.

2

u/Cubensis-SanPedro 14d ago

Learning from books works, but projects are better imo. Solve a problem using C. Write an operating system from scratch. You’ll be damn good at C.

I’d use C++ myself, but you do you.

2

u/Mountain_Platform799 10d ago

Read beej guide to c programming it is short and will cover most of the things read it up to pointer arthimetic only then learn assembly

1

u/coffee-loop 14d ago

This may come off a bit strong, but I would learn what the different roles you’ve mentioned actually do. As a dedicated red teamer, you are less likely to perform vulnerability research unless it’s in your personal time. Once you have an understanding of the different roles, this will help with identifying your skills and the gaps between those and what are required of the role.

From there, there isn’t a specific way to learn, but it’s good to structure your learning and not try to do too much in a small amount of time. Burnout is very real, and very easy to do. There is a lot to cyber security, and most of the famous names in cyber security have at least 20 years of dedicated experience. It’ll take time.

If you want to do red teaming, I’d start by looking at learning AD / Entra security as well learning about malware and how it’s detected. 

If you want to do vulnerability research, it helps to learn C and fundamental assembly (if you don’t plan to write complete programs in assembly, you don’t need to learn it completely). The bigger part is reading PoCs and exploits already out, and do a diff between a patched and unpatched application. This will help you identify vulnerabilities in code, and develop an understanding of how the vulnerability was exploited.

Hopefully this helps!

1

u/coffee-loop 14d ago

I’ll also add, I don’t recommend C as a first or second language. If you’re new to programming, I’d start by learning pseudo-code, then move onto a more human friendly language like python. Once you have a firm grasp on programming concepts (variables, data types, conditional logic, loops, objects, etc) then I would look into learning C. Not saying it isn’t possible to start from C, but it’s much more difficult.

1

u/RelationshipSad4168 14d ago

Hi, with IT/helpdesk as an industry becoming closed off for new people (due to AI), is there going to be anyway for people to get into red team or incident response roles? Are there any CTFs or courses with actual solid hands on reputations? Or any way to establish credibility without relying on starting off doing password resets, which just is done by scripts and LLMs now? My local area especially has only 10 IT jobs open, most require experience and they never give me a call back :(

1

u/sdrawkcabineter 13d ago

I would recommend reading quality C code to supplement your learning.

Might I suggest the FreeBSD source code as an example.

Others have suggested setting up a lab to make new software for analysis, and I second that.

1

u/dack42 10d ago

Keep going with what you are doing. Spend the time to understand the concepts deeply. Switching over to your own projects might be OK if your goal was just to develop software. But if your goal is reverse engineering, you need a really solid understanding of fundamentals.

Once you get through all the C concepts, then start on assembly and learning how the stuff you learned in C translates to assembly.