What make Mac OS more safe if C++ is

  • C/C++
  • Thread starter PainterGuy
  • Start date
  • Tags
    C++ Mac Os
In summary: D I don't think I've ever heard of a virus/malware written specifically to target Macs, but I have heard of people who have written viruses/malware on other platforms than Windows. I've never heard of anyone who has tried to do any damage to Macs, just to see if they could or not.But that's just my experience. I could be wrong.In summary, 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
  • #1
PainterGuy
940
69
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
  • #2
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!"
 
  • #3
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
 
  • #4
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.
 
  • #5
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.
 
  • #6
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
 
  • #7
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.
 

Related to What make Mac OS more safe if C++ is

1. What makes Mac OS more safe than other operating systems?

Mac OS is built on a Unix-based foundation, which has a strong focus on security. Additionally, Mac OS has a built-in security framework called Gatekeeper that only allows apps from trusted developers to be installed, preventing malware from being downloaded.

2. How does C++ contribute to the safety of Mac OS?

C++ is a programming language that allows for low-level control and memory management, making it less vulnerable to common security issues such as buffer overflows. This helps to make Mac OS more secure by reducing the risk of these types of vulnerabilities.

3. Does Mac OS have any security features specific to C++?

Mac OS has a feature called Address Space Layout Randomization (ASLR) which randomizes the memory location of C++ code and data, making it more difficult for attackers to exploit vulnerabilities in the code.

4. Are there any disadvantages to using C++ in Mac OS for security purposes?

While C++ does have its advantages for security, it also has a steep learning curve and can be more complex to code in compared to other languages. This can make it more difficult for developers to write secure code, potentially leaving room for vulnerabilities.

5. Can Mac OS still be vulnerable to security threats despite using C++?

No operating system is completely immune to security threats. While C++ can help to make Mac OS more secure, it is not a guarantee against all types of attacks. It is important for users to practice safe browsing habits and keep their operating system and apps up to date to further enhance security.

Similar threads

  • Programming and Computer Science
Replies
2
Views
3K
  • Thermodynamics
Replies
3
Views
772
  • Computing and Technology
Replies
2
Views
2K
  • STEM Career Guidance
Replies
6
Views
2K
  • General Engineering
Replies
2
Views
1K
  • Computing and Technology
Replies
5
Views
3K
  • Computing and Technology
Replies
27
Views
18K
  • DIY Projects
Replies
20
Views
338
  • New Member Introductions
Replies
1
Views
435
Back
Top