Questions tagged [c++]

The C++ programming language

C++ is a low-level programming language. It allows (but discourages) direct pointer manipulation, making it rife for security vulnerabilities.

Use this tag for questions about security that are directly related to C++, such as security analysis of C code and exploiting badly-written C++ code. Do not use this tag just because you're writing a program in C++, only if C++ is directly relevant to the question. Questions about programming in C++ are off-topic here, but can be asked on Stack Overflow.

103 questions
0
votes
1 answer

SAT (Satisfiability) it is security risk?

If researcher found satisfiability in any software, this is a threat to security? If answer - "Yes", how can attacker to use SAT?
69 420 1970
  • 113
  • 6
0
votes
2 answers

Over 100 scanner requests 5 min after domain registration

Yesterday I registered a .cf domain, I needed it for about 10 minutes. About 5 minutes after domain registration I got over 100 scanner requests (I checked all requests, all are automated scanner requests like ZmEu etc.) in under 10…
user182663
0
votes
1 answer

Key distribution from a central server

I have a system composed by different computers that must communicate in a real-time context. All the communications must be encrypted and this system is not connected to Internet, it's just a bunch of computers that are connected via different…
svoltron
  • 1
  • 1
0
votes
1 answer

Compiler Parameters to isolate a C++ program

Is there any set of compiler parameters that can be used to prevent a C++ program from having any access to most system functions, leaving it with access to read/write to stdin/stdout, but otherwise unable to harm the system. This strikes me as…
Stack Tracer
  • 514
  • 2
  • 5
  • 14
0
votes
3 answers

Some vulnerable projects in C or C++ for a lecture?

I'm looking for some real projects which have stack overflow vulnerabilities. The important thing is, I am going to teach finding the vulnerabilities and the way of fixing them by these examples. So, the vulnerabilities should be simple to find and…
Berliner
  • 5
  • 1
  • 2
0
votes
1 answer

Are Optimization Flags Harmful?

There seems to be a consensus, that -D_FORTIFY_SOURCE=2 -O1 is a hardening measure that should be applied as compiler option. This was also a recommendation in the Dovecot Pentest Report. What I'm confused about is, that _FORTIFY_SOURCE=2 needs an…
user857990
  • 903
  • 1
  • 9
  • 21
0
votes
2 answers

Which approach to use to implement encryption in a Windows desktop app?

I will need to do some encryption of the user data in my Windows desktop application, written in C/C++ using WinAPIs (no .NET or WinRT stuff.) Namely, I'll be doing the following: Symmetric encryption: AES Public key encryption (asymmetric):…
c00000fd
  • 171
  • 6
0
votes
1 answer

How do hackers obtain the memory addresses of variables?

I've seen countless tutorials on hacking telling you that all you need to do is find the memory address of a variable and edit it, the problem is, they never explain how to do it. I'm not one for blackhat hacking and am only interested in making…
Rob Dawson
  • 1,186
  • 1
  • 12
  • 16
-1
votes
1 answer

What makes firewall pop up?

I am creating a file that uses Socket for exchanging data. When I use Python I have a firewall pop up where I am asked to accept the use of the application, but when my C++ program tries to do the same, the firewall doesn't warn me. My question is…
LeoSegol
  • 1
  • 1
-2
votes
1 answer

How to store a hexadecimal string representation in C++ for use in cryptography

Homework question The full question is the following: Suppose you are told that the one time pad encryption of the message "attack at dawn" is 09e1c5f70a65ac519458e7e53f36 (the plaintext letters are encoded as 8-bit ASCII and the given ciphertext is…
Mike
  • 101
  • 2
-2
votes
1 answer

If I put a variable in the private section of a class, will the variable have more protection againsted reverse engineering?

class LockdownUnlock{ private: /*snip*/ std::string rootCertificate; //Will this protect the data? /*snip*/ public: /*snip*/ }LDUnlock;
Ahab Devoid
  • 5
  • 1
  • 4
-2
votes
1 answer

How to encrypt a file?

I created my own encrypt / decrypt script and I can encrypt any kind of strings. I just need to know how can I use my script to encrypt a file like an image or a text file? My script is working in PHP, C++ and VB.
Sinf
  • 7
  • 4
-2
votes
2 answers

Do you know a harmless exe file that copies itself into a file?

I'm doing a simple project where I read an exe file and if I find a virus that I already know, I erase it from the file. I have to test it with a virus (I'm looking for something harmless) that insert itself into a file but I haven't found anything.…
Rivid
  • 17
  • 1
1 2 3 4 5 6
7