C/C++ What make Mac OS more safe if C++ is

  • Thread starter Thread starter PainterGuy
  • Start date Start date
  • Tags Tags
    C++ Mac Os
AI Thread Summary
The discussion centers on the security differences between Mac OS and Windows, both of which are built using C++. Key points highlight that the programming language itself is not the source of insecurity; rather, it is how the language is implemented. Mac OS benefits from a permissions system that restricts unauthorized code execution, making it more resilient against viruses compared to Windows, where users often operate with administrative privileges, allowing malicious code greater access. The lower market share of Mac OS historically meant less incentive for virus creators to target it. Additionally, the evolution of operating systems plays a role; Mac OS frequently updates, while Windows has maintained older versions longer, potentially creating more vulnerabilities. The conversation also touches on the nature of virus creation, suggesting that many hackers are motivated by curiosity rather than profit, and that the lack of traditional viruses for Mac OS X is partly due to its historical user base and security model.
PainterGuy
Messages
938
Reaction score
72
hello nice people,

it was read by me that both ms windows and apple os has been made using basicaly c++. some days in past on a some antivirus article it came to my attention apple os is safe from virus than windows. if both use same kind of bricks they why bricks are easy to break in windows? is this due to thickness of wall which help mac os more safe? your help is much obliged. look forward to your reply.

cheers
 
Technology news on Phys.org
You can build a house out of straw, sticks, or brick, but if they all have big bay windows and the wolf has stones, he won't have to huff and puff to blow your house down.

C++ is just a programming language; the insecurity lies not in the language being used (or even the resultant machine code) but rather the WAY in which it is used:
http://www.pcworld.com/businesscenter/article/202452/why_linux_is_more_secure_than_windows.html

Unfortunately, the answer may just be that Mac OS X (and Unix, upon which it is based) has that much less market share. Someone sardonically remarked, "See? Even viruses don't support Mac OS X!"
 
MATLABdude said:
You can build a house out of straw, sticks, or brick, but if they all have big bay windows and the wolf has stones, he won't have to huff and puff to blow your house down.

C++ is just a programming language; the insecurity lies not in the language being used (or even the resultant machine code) but rather the WAY in which it is used:
http://www.pcworld.com/businesscenter/article/202452/why_linux_is_more_secure_than_windows.html

Unfortunately, the answer may just be that Mac OS X (and Unix, upon which it is based) has that much less market share. Someone sardonically remarked, "See? Even viruses don't support Mac OS X!"

hello MATLABdude,

much thanks for help. like you reply.

cheers
 
Mac OS X and other Unix-like operating systems (e.g. Linux, BSD--OS X is based off of FreeBSD) use permissions systems such that it is very difficult to run code without authorization. This provides protection from viruses and worms that is much better than Windows, but it won't protect a user from trojan horses or other user-installed software.

Part of this comes from the fact that users on Unix-like OSes default to being standard user accounts, and must sudo/su to root. Windows still defaults to having users run as administrators, which means that if malicious code is run it has access to the whole system and can pretty much do everything. MS is trying to move to get users to run as standard users, but a history of third party devs being used to coding for software that runs as admin has presented compatibility issues. UAC introduced in Vista is a step in the right direction; it's basically an MS copy of sudo, but done in a slightly less useful way usability-wise IMO.
 
I suspect the main reason that Mac and **IX systems have been "protected" from viruses are

1. Until recently Macs had such a low market share that there wasn't much point in virus writers bothering with them. After all, the reason people rob banks is because that's where the money is, not because they are the easiest places to rob.

2. Paradoxically, operating systems can be harder to attack when they were less stable. Windows XP has been around virtually unchanged for many years. Apple tends to bring out new backwards-incompatible hardware and software every few months. The other **IX systems all have the unique selling point that they are different from every other **IX system out there (irony intentional).

Now that Apple are heading for a significant market share, I would expect a lot of their "we don't need any protection against anything" user base may get some nasty surprises.
 
jhae2.718 said:
Mac OS X and other Unix-like operating systems (e.g. Linux, BSD--OS X is based off of FreeBSD) use permissions systems such that it is very difficult to run code without authorization.

UNIX was developed for users to share machines-- big powerhouse computers in the 70's where users were all using the machine at once. So UNIX had to ensure that there were safeguards in place, since otherwise, an individual user could do something wrong and crash the system, or hog system resources away from other users.

Windows (really DOS to start) was developed for personal computers. People were expected to be the only users of the system, so if they crashed their own computer, or hogged resources, it wasn't a big deal-- they'd be doing it to themselves alone.

jhae2.718 said:
Part of this comes from the fact that users on Unix-like OSes default to being standard user accounts, and must sudo/su to root. Windows still defaults to having users run as administrators, which means that if malicious code is run it has access to the whole system and can pretty much do everything.

I've always blamed it on permissioning (as you point out), the file registry (shared "global" resource), and the fact that Windows/DOS supposedly let's (or used to let) the programs write directly to the device drivers, bypassing the operating system (supposedly done to increase performance-- remember all those games in the 90's that would ask you what type of sound card and video capabilities you had?) Couple that with the fact that Windows has always tried to make software backwards-compatible, and you're in for a tangled nightmare.

But while that's always been my assumption as to what has made Windows vulnerable, I don't really know. Do those issues still affect Windows machines now? Now they've got multiple users, and I don't know if they allow direct access to device drivers. And I have no idea what (if anything?) is in place to protect the registry.

AlephZero said:
Until recently Macs had such a low market share that there wasn't much point in virus writers bothering with them. After all, the reason people rob banks is because that's where the money is, not because they are the easiest places to rob.

I dunno-- I found that people didn't really write viruses with the *intent* to write viruses. They typically did it because they would find loopholes, and were curious to see in what ways they could abuse them. Profit wasn't usually a motivation, but an afterthought. "Woah! It looks like I can usurp control of people's hard-drives! ... Wait a minute ... I can scan it for credit card numbers, and report them back to myself!"

Essentially, Macs had a low market share among *hackers*-- so hackers weren't typically playing with them, and as a result, weren't finding loopholes in the code. Hackers are often the type to experiment and tinker with their computers, which Macs historically didn't let you do. Plus, they've been pretty pricey.

DaveE
 
The classic Mac OS did attract some viruses. One of my early Macs was infected once, from a college lab computer via a floppy disk. Symantec sold an antivirus program for Macs, and there was at least one highly-regarded freeware antivirus program.

But there have been no traditional viruses for OS X "in the wild" as far as I know.
 
Back
Top