Can we create an antivirus using C++, because it will scan through the deepest parts of the HDD ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Can we create an antivirus using C++, because it will scan through the deepest parts of the HDD ?

Can we use the ability of the C++ internal codes to access every file of the OS and check it with parity bit ?

2nd Aug 2017, 2:00 PM
Rudraksh Kanekar
Rudraksh Kanekar - avatar
3 Answers
+ 4
How far down this rabbit hole do you want to go? For an effective AV, you'll need to write your own drivers (and get them approved), have access to ring 0 and be able to skip the HAL (and CPU microcode) on demand. Some things are especially tricky because the CPU will be in protected mode. In an ideal world, you would also override drive firmware but I don't know of any commercial products that do that. C++ will be more convenient than, but likely slower than C with assembly. At this level there aren't as many abstractions to help you; choosing your depth is mostly about balancing the fiddly system-differences you're willing to support.
2nd Aug 2017, 4:24 PM
Kirk Schafer
Kirk Schafer - avatar
+ 5
Yes, you can if you understand how the virus attack system works and has the counter action to undo the infected files.
2nd Aug 2017, 2:02 PM
Calviղ
Calviղ - avatar
+ 5
Are interested in antivirus software? If so, this thread may help you https://www.sololearn.com/discuss/563537/?ref=app
2nd Aug 2017, 2:23 PM
Manual
Manual - avatar