Malicious Xcode could spread via download manager Xunlei

What’s at stake?

We reported last week that popular Chinese iOS apps were compromised in an unprecedented malware attack. We discovered that the source of the infection was compromised copies of Xcode hosted on Baidu Pan. Apple has published an article urging developers to download Xcode directly from the Mac App Store, or from the Apple Developer website and validate signatures. We’ve now discovered that even if a developer uses a download link seemingly from Apple, he might still be possible to obtain a compromised copy of Xcode.

Please note that we do not have evidence that such attacks has happened. But it is an easy attack that anyone can implement.

How does it work?

This compromise happened because of Xunlei. Xunlei is the most popular download manager in China. Much of its popularity is due to the fact they can accelerate download speeds by pulling resources from other Xunlei users as well as cached copies on the Xunlei server. All of this, however, is invisible to users. Users can simply enter a regular http download address into Xunlei  download manager and the download will start. Chinese developers were using direct download addresses such as http://adcdownload.apple.com/Developer_Tools/Xcode_7/Xcode_7.dmg to download Xcode.

Because of Xunlei’s P2P and server cache, download speeds would be much faster than the Mac App Store. Downloading via Xunlei also means that developers do not need to be enrolled in the Apple developer program. Direct downloads of Xcode via the developer program cost $99. Because the URL belongs to Apple, users were tricked into thinking that the download link was authentic and hence the Xcode copy. But in actual fact, the file is not authentic because it comes from Xunlei’s P2P and server cache.

The way to “host” a compromised copy of Xcode on Apple’s server is to trick Xunlei locally and let the error propagate. For example, a malicious user can hijack adcdownload.apple.com locally via host file and download from a non-exsistant URL http://adcdownload.apple.com/xcode-fake-1.1.1.1.dmg. Xunlei will then correlate this URL with the file specified by the malicious user and provide this file to other innocent users.

This is what actually happens when you use Xunlei to download http://adcdownload.apple.com/xcode-fake-1.1.1.1.dmg

But if you look at the details of the download source, you can see that 0% of the download is from the original server (i.e adcdownload.apple.com) while the server cache accounts for 26% and P2P accounts for 3% of the download.

You can also see that attempts by Xunlei to connect to adcdownload.apple.com were redirected to https://developer.apple.com/unauthorized/  because Apple only allows users in the Apple developer program to access the page.

Malicious attackers can poison Xunlei with a URL similar to a real Apple Xcode URL and then post the fake URL on forums and download sites. Most Chinese users by default use Xunlei to download. In fact, they have to if they are not enrolled in the Apple developer program. Most will have a compromised copy of Xcode, seemingly downloaded from Apple.

 

What can developers do to prevent future attacks?

Our suggestions are exactly the same from our last blog post.

  • Always download Xcode from the official Mac App Store. For other developer tools, always download these from official sources.

  • Always check the digital signature of developer tools. It is irresponsible for developers to ignore signature warnings. Xcode clearly should have been signed by Apple; all other versions should have produced user warnings.

  • Separate your development system with your everyday system. Development systems should be used solely for development and not for browsing random sites. If physical separation presents too much of a problem for developers, at the very least, a dedicated user account for development should be used.

 

Xunlei users should be cautious

As demonstrated above, Xunlei cannot be trusted to download the correct file, even if the download link is HTTPS. Users should manually check hash after download or use the browser’s download function.

 

References:

https://v2ex.com/t/222553

 

Comments

More Blog Posts

Subscribe to our mailing list
Show content from Blog | Google+ | Twitter | All. Subscribe to our blog using RSS.

Thu, Aug 10, 2023

1.4 million people used FreeBrowser to circumvent the Great Firewall of Turkmenistan

Since 2021, the authorities in Turkmenistan have taken exceptional measures to crack down on the use of circumvention tools. Citizens have been forced to swear on the Koran that they will not use a VPN. Circumvention tool websites have been systematically blocked. Arbitrary searches of mobile devices have also taken place and have even targeted school children and teachers.

The government has also blocked servers hosting VPNs which led to “near complete” internet shutdowns on several occasions in 2022. Current reports indicate that 66 hosting providers, 19 social networks and messaging platforms, and 10 leading content delivery networks (CDNs), are blocked in the country. The government presumably is unconcerned about the negative economic impact that such shutdowns can cause.

Fri, Mar 18, 2022

Well-intentioned decisions have just made it easier for Putin to control the Russian Internet

This article is in large part inspired by a recent article from Meduza (in Russian).

Since the beginning of the war in Ukraine, Russian users have had problems accessing government websites and online banking clients. Browsers began to mark these sites as unsafe and drop the connection. The reason is the revocation of digital security certificates by foreign certificate authorities (either as a direct consequence of sanctions or as an independent, good will move); without them, browsers do not trust sites and “protect” their users from them.

However, these actions, caused - or at least triggered by - a desire to punish Russia for their gruesome actions in Ukraine, will have long-lasting consequences for Russian netizens.

Digital certificates are needed to confirm that the site the user wants to visit is not fraudulent. The certificates contain encryption keys to establish a secure connection between the site and the user. It is very easy to understand whether a page on the Internet is protected by a certificate. One need just look at the address bar of the browser. If the address begins with the https:// prefix, and there is a lock symbol next to the address, the page is protected. By clicking on this lock, you can see the status of the connection, the name of the Certification Authority (CA) that issued the certificate, and its validity period.

There are several dozen commercial and non-commercial organizations in the world that have digital root certificates, but 3/4 of all certificates are issued by only five of the largest companies. Four of them are registered in the USA and one is registered in Belgium.

Mon, Aug 03, 2020

Announcing the Release of GreatFire AppMaker

GreatFire (https://en.greatfire.org/), a China-focused censorship monitoring organization, is proud to announce that we have developed and released a new anti-censorship tool that will enable any blocked media outlet, blogger, human rights group, or civil society organization to evade censors and get their content onto the phones of millions of readers and supporters in China and other countries that censor the Internet.

GreatFire has built an Android mobile app creator, called “GreatFire AppMaker”, that can be used by organizations to unblock their content for users in China and other countries. Organizations can visit a website (https://appmaker.greatfire.org/) which will compile an app that is branded with the organization’s own logo and will feature their own, formerly blocked content. The app will also contain a special, censorship-circumventing web browser so that users can access the uncensored World Wide Web. The apps will use multiple strategies, including machine learning, to evade advanced censorship tactics employed by the Chinese authorities.  This project will work equally well in other countries that have China-like censorship restrictions. For both organizations and end users, the apps will be free, fast, and extremely easy to use.

This project was inspired by China-based GreatFire’s first-hand experience with our own FreeBrowser app (https://freebrowser.org/en) and desire to help small NGOs who may not have the in-house expertise to circumvent Chinese censorship. GreatFire’s anti-censorship tools have worked in China when others do not. FreeBrowser directs Chinese internet users to normally censored stories from the app’s start page (http://manyvoices.news/).

Fri, Jul 24, 2020

Apple, anticompetition, and censorship

On July 20, 2020, GreatFire wrote to all 13 members of the Subcommittee on Antitrust, Commercial and Administrative Law of the U.S. House Committee on the Judiciary, requesting a thorough examination into Apple’s practice of censorship of its App Store, and an investigation into how the company collaborates with the Chinese authorities to maintain its unique position as one of the few foreign tech companies operating profitably in the Chinese digital market.  

This letter was sent a week before Apple CEO TIm Cook will be called for questioning in front of the Subcommittee on Antitrust, Commercial and Administrative Law. The CEOs of Amazon, Google and Facebook will also be questioned on July 27, as part of the Committee’s ongoing investigation into competition in the digital marketplace.

This hearing offers an opportunity to detail to the Subcommittee how Apple uses its closed operating ecosystem to not only abuse its market position but also to deprive certain users, most notably those in China, of their right to download and use apps related to privacy, secure communication, and censorship circumvention.

We hope that U.S. House representatives agree with our view that Apple should not be allowed to do elsewhere what would be considered as unacceptable in the U.S. Chinese citizens are not second class citizens. Private companies such as Apple compromise themselves and their self-proclaimed values of freedom and privacy when they collaborate with the Chinese government and its censors.

Mon, Jun 10, 2019

Apple Censoring Tibetan Information in China

Apple has a long history of censorship when it comes to information about Tibet. In 2009, it was revealed that several apps related to the Dalai Lama were not available in the China App Store. The developers of these apps were not notified that their apps were removed. When confronted with these instances of censorship, an Apple spokesperson simply said that the company “continues to comply with local laws”.

In December, 2017, at a conference in China, when asked about working with the Chinese authorities to censor the Apple App Store, Tim Cook proclaimed:

"Your choice is: do you participate, or do you stand on the sideline and yell at how things should be. And my own view very strongly is you show up and you participate, you get in the arena because nothing ever changes from the sideline."

In the ten years since Apple was first criticized for working with the Chinese authorities to silence already marginalized voices, what has changed? Apple continues to strictly follow the censorship orders of the Chinese authorities. When does Tim Cook expect that his company will help to bring about positive change in China?

Based on data generated from https://applecensorship.com, Apple has now censored 29 popular Tibetan mobile applications in the China App Store. Tibetan-themed apps dealing with news, religious study, tourism, and even games are being censored by Apple. A full list of the censored apps appear below.

Subscribe to our blog using RSS.

Comments

Oscars Awards 2016 Live Stream|| Watch Online Oscars 88th Annual Academy Awards from the Dolby Theater in Los Angeles on Sunday, 28 Feb 2016 at 5:30 PM PT / 8:30 PM ET.

Oscars Awards 2016 Live Stream

http://oscars2016live.com/

The 88th Academy Awards Online

Oscars Awards 2016 Live Stream

See The Oscars 88th annual academy awards 2016 Live Stream” Online full broadcast here...Oscars 2016 Live Streaming” saw the pre-show to start at 6:30PM ET with Oscar awards live red carpet coverage start at 7PM ET.Best Picture nominees for the 88th Academy Awards include: The Big Short, Bridge of Spies, Brooklyn, Mad Max: Fury Road, The Martian, The Revenant, Room and Spotlight.Exclusive red carpet coverage begins. watch-live or through the WATCH ABC app on supported devices for fans living in Chicago, Fresno, Houston, Los Angeles, New York City.

Super Bowls 2016 Live Stream || Free Panthers vs Broncos Super Bowl 50 Live Online Streaming, Info Mega NFC Event Telecast From Feb.

7, 2016 at Levi’s Stadium in Santa Clara, California.

Super Bowls 2016 Live Stream

http://superbowls2016.co/

Panthers vs Broncos Super Bowl 50 Live Live Online Streaming

Super Bowls 2016 Live Stream

Watch Super Bowl 2016 live stream free online – “Super Bowl 50” Why may she not play the best wearing event Super Bowl 2016 live

stream of the year, which in like manner happens to be a perspective event for pop culture. The full merriments of Super Bowl 2016 live

streaming free online will be See Enjoy accessible, Desktop, portable workstation, android, PC, Tabe and the Telecast From Levi’s

Stadium in Santa Clara, California will have Super Bowl 50 in the middle of Carolina and Denver on Sunday, Feb. 7, 2016 at 6:30pm ET.

Oscars Awards 2016 Live Stream|| Watch Online Oscars 88th Annual Academy Awards from the Dolby Theater in Los Angeles on Sunday, 28 Feb

2016 at 5:30 PM PT / 8:30 PM ET.

Oscars Awards 2016 Live Stream

http://oscars2016live.com/

The 88th Academy Awards Online

Oscars Awards 2016 Live Stream

See The Oscars 88th annual academy awards 2016 Live Stream” Online full broadcast here...Oscars 2016 Live Streaming” saw the pre-show

to start at 6:30PM ET with Oscar awards live red carpet coverage start at 7PM ET.Best Picture nominees for the 88th Academy Awards

include: The Big Short, Bridge of Spies, Brooklyn, Mad Max: Fury Road, The Martian, The Revenant, Room and Spotlight.Exclusive red

carpet coverage begins. watch-live or through the WATCH ABC app on supported devices for fans living in Chicago, Fresno, Houston, Los

Angeles, New York City.

That was really nice stuff. Thank You for sharing here.
Keep Posting
From :- http://www.nfllivestreamfree2015.com/

Info untuk menyembuhkan sakit maag dengan obat maag tradisional, obat maag alami juga, obat maag herbal.

Best Quotes, Images, Pictures for Happy International Women’s Day 8th March 2016 and some sms, status, whatapp dp, pics, photo and funny greetings for mom, sister, daughter

http://happywomensday2016.com

Click here to see Best Alcohol and Drug Rehab Centers in USA another one is click here to see http://www.birthdaywishes-quotess.com/

There's an error in the article: Xcode does not require a paid Apple Developer subscription to download Xcode. A paid subscription is only needed to put software on the Apple iOS or Mac App stores. A valid Apple ID (iTunEs store account) is all that is required to download Xcode from Apple.

thats great post , i will recommend everyone to see it. http://aprilfoolsjokesschool.pw thanks for sharing

Great Post. Keep writing Useful contents like this. I think reading the article on the web that is very useful especially in this website.

http://www.pacquiaovsbradley2live.com/

Great article. Thanks for sharing this. Hope you continue providing useful posts like this.
http://www.uefachampionsleaguelivestream.net/

Pages

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.