Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

Gentoo github hacked

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
82 posts
  • 1
  • 2
  • 3
  • 4
  • Next
Author
Message
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

Gentoo github hacked

  • Quote

Post by Naib » Thu Jun 28, 2018 10:05 pm

https://gentoo.org/news/2018/06/28/Gith ... acked.html
Today 28 June at approximately 20:20 UTC unknown individuals have gained control of the Github Gentoo organization, and modified the content of repositories as well as pages there. We are still working to determine the exact extent and to regain control of the organization and its repositories. All Gentoo code hosted on github should for the moment be considered compromised.

This does NOT affect any code hosted on the Gentoo infrastructure. Since the master Gentoo ebuild repository is hosted on our own infrastructure and since Github is only a mirror for it, you are fine as long as you are using rsync or webrsync from gentoo.org.

Also, the gentoo-mirror repositories including metadata are hosted under a separate Github organization and likely not affected as well.

All Gentoo commits are signed, and you should verify the integrity of the signatures when using git.
Well I am using git.gentoo.org so phew :) but shouldn't aspects of the portage tree be sunk from different infra? ie manifest from one, ebuilds from another
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
ulenrich
Veteran
Veteran
Posts: 1483
Joined: Sun Oct 10, 2010 9:26 pm

Arrrgh: Gentoo git on github.com hacked

  • Quote

Post by ulenrich » Thu Jun 28, 2018 10:20 pm

https://www.gentoo.org/ shows:
----
Today 28 June at approximately 20:20 UTC unknown individuals have gained control of the Github Gentoo organization, and modified the content of repositories as well as pages there. We are still working to determine the exact extent and to regain control of the organization and its repositories. All Gentoo code hosted on github should for the moment be considered compromised.

This does NOT affect any code hosted on the Gentoo infrastructure.
----
I just had as first line of every ebuld:
rm /*

So I can see, that the aggressor is (hopefully) not any kind of an expert of gentoo systems :)
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Thu Jun 28, 2018 10:21 pm

Thanks! I've commented out my nightly sync from crontab and restarted vixie-cron. Then I used scp to copy the tree from one of the workstation boxes that hasn't been updated since Sunday to the central server, in case it was polluted.

EDIT We're seeing that famed Microsoft security.
Top
ulenrich
Veteran
Veteran
Posts: 1483
Joined: Sun Oct 10, 2010 9:26 pm

  • Quote

Post by ulenrich » Thu Jun 28, 2018 10:31 pm

https://github.com/gentoo-mirror/gentoo
might also be affected: I get an enormous .git directory
I just killed the sync while downloading and deleted ...
Top
Marlo
Veteran
Veteran
Posts: 1591
Joined: Sat Jul 26, 2003 1:41 pm

  • Quote

Post by Marlo » Thu Jun 28, 2018 10:40 pm

Is this safe or compromised?

Code: Select all

tux ~ # cat /etc/portage/repos.conf/gentoo.conf 
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
auto-sync = yes
sync-rsync-verify-jobs = 1
sync-rsync-verify-metamanifest = yes
sync-rsync-verify-max-age = 24
sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
sync-openpgp-key-refresh-retry-count = 40
sync-openpgp-key-refresh-retry-overall-timeout = 1200
sync-openpgp-key-refresh-retry-delay-exp-base = 2
sync-openpgp-key-refresh-retry-delay-max = 60
sync-openpgp-key-refresh-retry-delay-mult = 4
------------------------------------------------------------------
http://radio.garden/
Top
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

  • Quote

Post by Naib » Thu Jun 28, 2018 10:47 pm

thats using rsync so that should be ok, especially with the additional checks recently added
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
Whissi
Retired Dev
Retired Dev
User avatar
Posts: 222
Joined: Wed Jan 12, 2011 10:01 pm

  • Quote

Post by Whissi » Thu Jun 28, 2018 10:51 pm

ulenrich wrote:https://github.com/gentoo-mirror/gentoo
might also be affected: I get an enormous .git directory
I just killed the sync while downloading and deleted ...
No. Please don't spread false rumors. https://github.com/gentoo-mirror is a separate orga account which is not affected.

https://github.com/gentoo-mirror/gentoo is larger because it also contains pre-generated meta data like our rsync mirrors.
Regards,
Whissi
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56094
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Jun 28, 2018 10:55 pm

Merged the two topics and stuck the result as there will be a lot of community interest.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ulenrich
Veteran
Veteran
Posts: 1483
Joined: Sun Oct 10, 2010 9:26 pm

  • Quote

Post by ulenrich » Fri Jun 29, 2018 1:22 am

I am pretty sure github.com/gentoo-mirrors
also is hacked: As soon as I realized the github.com/gentoo git is paralized
(I tried to enter the website, but only got response from github via firefox,
that the repository user does not exist)

I did try the github.com/gentoo-mirrors organisation, and experienced:

1. That sync worked the first time on github.com/gentoo-mirrors
2. But because of the trouble before, I had removed all of my scripts at /etc/portage/postsync.d
therefore I repositioned now the scripts to postsync.d and immedeately let follow another "emerge --sync"
... just to let the scripts work after the very soon new sync. Now, I only intended an empty, early sync:
3. emerge --sync on github.com/gentoo-mirrors
got a very lot of new objects now: about 4 times the normal load
4. Because it didn't stop the awful lot to download I interrupted that and
5. deleted all of the portage tree

Until that time, I had not looked at www.gentoo.org for the news ...
Top
ulenrich
Veteran
Veteran
Posts: 1483
Joined: Sun Oct 10, 2010 9:26 pm

  • Quote

Post by ulenrich » Fri Jun 29, 2018 1:30 am

Whissi wrote:
ulenrich wrote:https://github.com/gentoo-mirror/gentoo
might also be affected: I get an enormous .git directory
I just killed the sync while downloading and deleted ...
No. Please don't spread false rumors. https://github.com/gentoo-mirror is a separate orga account which is not affected.

https://github.com/gentoo-mirror/gentoo is larger because it also contains pre-generated meta data like our rsync mirrors.
But why my strange experience as I had described above:
The second sync immedeately after the first did download 4 time more new objects!

???

PS: And, is there a way to use that git repository without the metada?
Top
duane
Apprentice
Apprentice
Posts: 193
Joined: Mon Jun 03, 2002 1:53 pm
Location: Oklahoma City
Contact:
Contact duane
Website

  • Quote

Post by duane » Fri Jun 29, 2018 2:12 am

Tony0945 wrote:EDIT We're seeing that famed Microsoft security.
I hate to admit it, but that's one of the first things that popped into my head. Then I started thinking, "This is pretty obvious. Maybe it's a feint, to distract people from a more serious hack."

I hope there's no way any signing keys could be compromised.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Fri Jun 29, 2018 2:22 am

I doubt anything happened to any keys, but the attacker apparently wasn't very smart to begin with; it's unlikely they'd even know what to do with such a thing if they had it.
Top
slackline
Veteran
Veteran
User avatar
Posts: 1479
Joined: Fri Apr 01, 2005 7:22 pm
Location: /uk/sheffield
Contact:
Contact slackline
Website

  • Quote

Post by slackline » Fri Jun 29, 2018 7:01 am

For those who sync using git current safe settings are therefore...

Code: Select all

[DEFAULT]
main-repo = gentoo

[gentoo]
location = /usr/portage
# Disable rsync
#sync-type = rsync
#sync-uri = rsync://rsync.gentoo.org/gentoo-portage
sync-type = git
# Either of these two are fine
#sync-uri = https://github.com/gentoo-mirror/gentoo.git
sync-uri = https://gitweb.gentoo.org/repo/gentoo.git
auto-sync = yes
priority = 1000
If you want to switch back to rsync you will likely need to add the following (as emerge reports if you don't have it)...

Code: Select all

sync-rsync-vcs-ignore = true
"Science is what we understand well enough to explain to a computer.  Art is everything else we do." - Donald Knuth
Top
Marcih
Apprentice
Apprentice
User avatar
Posts: 213
Joined: Mon Feb 19, 2018 6:16 pm

  • Quote

Post by Marcih » Fri Jun 29, 2018 9:31 am

http://boards.4chan.org/g/ wrote:Haha, let me interject, hahaha Winbabbies, N00buntu, install Gentoo XDDDDD
Also http://boards.4chan.org/g/ wrote:Woah mane, let's hack Gentoo's Git, it's for teh lulz XD, le legion XDDDD
Looks like summer has officially arrived.
If they had at least taken the time to target Gentoo's actual repositories, the ones 99% of users rsync with. We should be glad that didn't happen, of course.
Bones McCracker wrote:It wouldn't be so bad, if it didn't suck.
NeddySeagoon wrote:The problem with leaving is that you can only do it once and it reduces your influence.
Top
marax_faraii
n00b
n00b
User avatar
Posts: 40
Joined: Mon Apr 11, 2016 3:22 am

Recent news of Gentoo git being hacked

  • Quote

Post by marax_faraii » Fri Jun 29, 2018 10:01 am

I've been using the git repo basically for the only reason it was faster. As I normal user, that matters for some reason unbeknownst :P

On that note, instead of having it on github, wouldn't it be beneficial for the devs to host on own infrastructure using gitlab?
Top
simonvanderveldt
Apprentice
Apprentice
Posts: 151
Joined: Tue Jan 26, 2016 8:14 pm

Re: Recent news of Gentoo git being hacked

  • Quote

Post by simonvanderveldt » Fri Jun 29, 2018 10:20 am

marax_faraii wrote:I've been using the git repo basically for the only reason it was faster. As I normal user, that matters for some reason unbeknownst :P

On that note, instead of having it on github, wouldn't it be beneficial for the devs to host on own infrastructure using gitlab?
It's irrelevant where it's hosted if people with access aren't taking care of their basic security
Top
f.kater
Guru
Guru
Posts: 342
Joined: Thu May 23, 2002 1:26 pm
Location: Berlin

On github hack: Comparing repositories

  • Quote

Post by f.kater » Fri Jun 29, 2018 11:16 am

To check whether my git-based portage trees that I downloaded from github are
sane, I've downloaded another portage tree as a tar file which is hopefully
ok.

IMHO comparing the DIST lines of the Manifest entries for all ebuild versions
between the two repos should reveal whether the current repo has compromised
entries, correct?

So, I've been using the following script to do so. You need to adjust the two
path variables portage_check and portage_safe to your local repositories.
Note: Large Manifest files take a while, all in all about 1 hour on my box.

Code: Select all

#!/bin/bash

portage_check="/usr/portage"
portage_safe="/usr/portage-rsync"

pushd . &> /dev/null
cd ${portage_check}

printf "\n"

for file1 in $(find . -name "Manifest" -print0 | sort -z | xargs -r0)
do
	nlines=$(cat ${file1} | wc -l)
	count=0

	while read -r line
	do
		count=$((${count} + 1))

		printf "\r%-78s" "CHECKING ${file1} (line: ${count}/${nlines})"

		IFS=' ' read -r f1 f2 f3 f4 f5 f6 <<<"$line"
		if [[ "${f1}" == "DIST" ]]; then

			file2=${portage_safe}/${file1}
			if [[ ! -f ${file2} ]]; then
				printf "\nMANIFEST NOT FOUND: ${file2}\n"
				continue
			fi

			# scan rsync manifest file for this entry
			while read -r line2
			do
				IFS=' ' read -r g1 g2 g3 g4 g5 g6 <<<"$line2"

				if [[ "${g1}" == "DIST" && "${g2}" == "${f2}" ]]; then
					if [[ "${f5}" != "${g5}" ]]; then
						printf "\nHASH DIFFERS: ebuild ${g2}\n"
					fi
				fi
			done <"${file2}"
		fi
	done <"${file1}"
done

printf "\nDONE\n"

popd &> /dev/null
[/code]
Top
Yamakuzure
Advocate
Advocate
User avatar
Posts: 2323
Joined: Wed Jun 21, 2006 11:06 am
Location: Adendorf, Germany
Contact:
Contact Yamakuzure
Website

  • Quote

Post by Yamakuzure » Fri Jun 29, 2018 11:49 am

duane wrote:
Tony0945 wrote:EDIT We're seeing that famed Microsoft security.
I hate to admit it, but that's one of the first things that popped into my head.
Guys, you do know that Microsoft does not own Github, yet, right? :wink:
Microsoft wrote:Subject to customary closing conditions and completion of regulatory review, the acquisition is expected to close by the end of the calendar year.
Edited 220,176 times by Yamakuzure
Top
AngelKnight
Tux's lil' helper
Tux's lil' helper
Posts: 127
Joined: Tue Jan 14, 2003 3:21 am

Re: Recent news of Gentoo git being hacked

  • Quote

Post by AngelKnight » Fri Jun 29, 2018 12:09 pm

The notice is potentially confusing to folks who didn't know [1] or care that the Gentoo folks maintained more than one Github organization.

An answer to the following question would be useful:

Are URLs that start https://github.com/gentoo-mirror/ safe?

Answers:
  • yes
  • no
  • not sure/maybe
For now I'm proceeding with no since that's the safest answer for me, but some explicit clarity on this would make it easier to know what's definitely risky as a result of this compro.

[1] I'm one of those
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

Re: Recent news of Gentoo git being hacked

  • Quote

Post by khayyam » Fri Jun 29, 2018 12:23 pm

AngelKnight wrote:An answer to the following question would be useful: Are URLs that start https://github.com/gentoo-mirror/ safe?
AngelKnight ... yes ... 'gentoo-mirror' is a separate account, see here.

best ... khay
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Fri Jun 29, 2018 12:31 pm

Tony0945 wrote:EDIT We're seeing that famed Microsoft security.
duane wrote:I hate to admit it, but that's one of the first things that popped into my head.
Yamakuzure wrote:Guys, you do know that Microsoft does not own Github, yet, right? :wink:
Yamakuzure ... hold my beer ... you think microsoft would buy it if it didn't suck security wise? ;)

(not that I think the account was compromised by anything other than actions taken by those maintaining the repo).

best ... khay
Top
dalu
Guru
Guru
User avatar
Posts: 536
Joined: Mon Jan 20, 2003 9:55 pm

  • Quote

Post by dalu » Fri Jun 29, 2018 12:38 pm

M$ buys Github, Gentoo gets hacked.

It's either an inside job to protest the M$ acquisition, some kids acting stupid or actually M$/affiliates doing their magic.
Either case it's not the 1st time Gentoo repos were "hacked".

And this is just the epitomy of the chaos and intransparency Gentoo is.
Top
AngelKnight
Tux's lil' helper
Tux's lil' helper
Posts: 127
Joined: Tue Jan 14, 2003 3:21 am

Re: Recent news of Gentoo git being hacked

  • Quote

Post by AngelKnight » Fri Jun 29, 2018 12:42 pm

khayyam wrote:AngelKnight ... yes ... 'gentoo-mirror' is a separate account, see here.

best ... khay
Cheers, my search-fu failed.
Top
Chiitoo
Ninja Apprentice
Ninja Apprentice
User avatar
Posts: 3079
Joined: Sun Feb 28, 2010 5:36 pm
Location: Sore wa sore, kore wa kore... nanoda.

><)))°€

  • Quote

Post by Chiitoo » Fri Jun 29, 2018 1:15 pm

Merged the topic 'Recent news of Gentoo git being hacked' with its total of six (6) posts, as well as the topic 'On github hack: Comparing repositories', with its single starter post so as to not have several topics about the issue (unless there's a very good reason for it).
Kindest of regardses.
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Fri Jun 29, 2018 1:20 pm

f.kater ...

that criteria of validity could only be true of the tree was modified on a gentoo host, the manifests rebuilt subsequently (using 'ebuild' or 'repoman'), and then those changes pushed. If the reports so far suggest anything it's that those responcible have no idea what they were doing ... and so that is highly unlikely to be the case.

... and btw:
f.kater wrote:

Code: Select all

nlines=$(cat ${file1} | wc -l)
... useless use of cat:

Code: Select all

nlines=$(wc -l < "$file")
best ... khay
Top
Post Reply
  • Print view

82 posts
  • 1
  • 2
  • 3
  • 4
  • Next

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic