How to go full-stack?

I have been trying to do a whole CTF (CaptureTheFlagGame) by using JavaScript and Angular but i never seem to get it finished though, any ideas on how i could implement the codes? because i am really bad at writting JavaScript Codes while alone but it is not because i cannot it is simply because i do not have any good ideas to start

What is your usual thought process when presented with a CTF?

Post a link to a CTF problem you’ve attempted and describe the analysis process you’d go through in order to solve it.

1 Like

I have been thinking of currently developing an AI that does pentesting jobs like most hacking as in CTF duties and it could be used for pro-testing stuff like in-production CTFs Vulnerable Machines (Vulnerable CTFs VM Images such as Daikunain CTF, Asperium CTF, and others that i won’t list due to how big this list would be, but will be avaliable either way)

Admirable but entirely unrelated to the question.

Your original question was regarding how to implement a coding solution to a CFT question or puzzle; do you have any examples of approaches you’ve tried to a specific example or question and where you ground to a halt?

1 Like

I have been trying to do a CTF puzzle through coding whether i might do it or not it depends on how skilled i might be

When you have a specific example and a description of your thought process, detailing what you tried, what worked and what did not, then we can address the question you originally asked:

1 Like

Oh yeah, that one, and i were trying to do a whole new CTF Game throughtout the slow process of leaning and testing through the levels as in a walkthrough CTF and that is not guessy, you’ll have to do it throughout obscurity and in a way with codes to mess with and it will be mostly vulnerable without any helpful tips on how to clear it up without crashing your system temporally, in that situation how would you pull it out to get the flag? do not worry, i will add a auto-save feature to it from 5 minutes each time so when you fail on doing it up it will be saved even with failed attempts

I have no idea what this means.

Are you trying to design a CTF scenario or are you trying to compete in one? Where does auto-saving come from?

Do you actually have a link to the CTF situation you’re describing?

Yes, i am trying to design a CTF scenario where it is built from codes and i will mostly do it using the C programming language and i will do it on system based operating systems architecturing so it will be standalone and you would not have a url to use since URLs are web based architecturing and it would not be that way though

When you have something to show as an example, feel free to fire this topic back up again.

However, until you have an actual specific question, and something concrete to demonstrate, this appears to be hypothetical, and I suspect it’ll remain the in hypothetical realm for some time.

1 Like

This is what i have so far and it is a completely working CTF Website that i did with AI because every website is done this way as of today because that is how everyone is doing that these days and there are no one else capable of website building like the old days anyway here is how it is now, from the testing to the full scope one:

I suspect the 8 web devs who work for me would disagree with you on that score!

Along with this AI generated Next.js and React site, do you have a question about some specific aspect of it?

You state that you’re intending to use C, but not what you’re actually going to write…

Obviously this React site is where the scores are kept and, participants are logged and progress is displayed, and so on, but where is the “Capture the Flag” part? Where are participants supposed to be capturing the flag from? Is there a secondary server with protection that is to be defeated in order to capture the flag or does the competition run through this Next.JS site?

1 Like

The competion runs through this Next.JS website but i am currently working on a new CTF Game that does the same thing and i used AI for javascript and full-stack stuff since i only know better at C and i know all of it

So what exactly is your question?

The topic title is “how to go full-stack?” and you originally asked “any ideas on how i could implement the codes?”, you mention C and post some AI generated React code but at the end of all of that, I’m still not sure what you’re actually asking.

1 Like

What should i do with these codes here? like i should refactor them all or what do i need to do since i do not know if any of them would do good though anyway here are the foremented codes i have asked to look at them:
#include <stdio.h>
#include <string.h>
void verificar_acesso(char entrada) {
int modificado = 0; /* Variável de controle (0 = Falso, 1 = Verdadeiro) /
char buffer[16]; /
Espaço reservado para 16 caracteres */

/* Copia a entrada sem checar o tamanho do destino */
strcpy(buffer, entrada);

/* Se a variável ‘modificado’ for alterada, o acesso é liberado */
if (modificado != 0) {
printf(“\n[+] ACESSO CONCEDIDO! Voce burlou a segurança.\n”);
printf(“ O valor de 'modificado foi alterado para: 0x%x\n”, modificado);
} else {
printf(“\n[-] Acesso Negado. Tente novamente.\n”);
}
}
int main(int argc, char *argv){
if (argc < 2){
printf(“Uso: %s <sua_senha>\n”, argv[0]);
return 1;
}

verificar_acesso(argv[1]);
return 0;
}

I’d correct the function parameter in your verification function, and fix the buffer overflow… or is this supposed to be an example piece of code demonstrating overflow?

1 Like

Yes it does not compile because is very broken and has some errors but i will still need to get it compile so i could finish up my ctf-game i have been doing in C as a project and it is fairly easy to pull it out unlike doing a AI as it may take years and could need at least 100 seniors in AI Engineering to do the job, but doing a simpler CTF could be done in at least 1 or 2 days

Are you currently fixing it up or what are you doing? did you get any results for a fix or not? what exactly are you doing right now?

I’m not doing anything - I read the code, saw the obvious issues with it and read your post.

Do you actually want it corrected? I assumed it was sample code for your CTF site that you were posting as an example.

Yes, i want it corrected since it has a fewer errors and is not functional but even though it is a sample code for my CTF site i might want the real thing and not something that is completely broken as in the start