Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cross-build injection attacks (using Maven et al.)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sander Mak  
View profile  
 More options Mar 23 2012, 4:09 pm
From: Sander Mak <sander...@gmail.com>
Date: Fri, 23 Mar 2012 13:09:02 -0700 (PDT)
Local: Fri, Mar 23 2012 4:09 pm
Subject: Cross-build injection attacks (using Maven et al.)

We often joke about 'Maven downloading the internet', but how often are we
concerned about what is actually downloaded? I've written some thoughts
(http://branchandbound.net/blog/security/2012/03/crossbuild-injection-...)
on cross-build injection attacks, where malicious code could be injected
into a build.

What do you guys do in practice to prevent this? Does anyone have real-life
experience with such an attack?

Regards,

Sander


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Reddin  
View profile  
 More options Mar 23 2012, 5:21 pm
From: Greg Reddin <gred...@gmail.com>
Date: Fri, 23 Mar 2012 16:21:20 -0500
Local: Fri, Mar 23 2012 5:21 pm
Subject: Re: [The Java Posse] Cross-build injection attacks (using Maven et al.)

On Fri, Mar 23, 2012 at 3:09 PM, Sander Mak <sander...@gmail.com> wrote:
> What do you guys do in practice to prevent this? Does anyone have real-life
> experience with such an attack?

I think you raise some really good questions here, some that I've
thought about before, but skipped over because "I don't have time to
think about those things" :-)

This is where organizations like the Apache Software Foundation are
helpful. Apache frowns upon projects that don't make releases every so
often, so you're likely to have a somewhat recent release of an apache
product. It's up to you and your dependent software projects to ensure
you're using the later releases.

But in the end, we can't rely on Maven, Nexus, Apache, nor anyone else
to do our due diligence for us. If our project includes a few dozen
jars pulled in from who knows where (as do most) we must check the
provenance of the bits we're including. Who does that? I know I don't
do that enough.

As an aside, do you know if Artifactory contains the PGP checking
feature that Nexus does? We've been using the open-source version of
Nexus and are in the process of switching to the pro version of
Artifactory.

Greg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabrizio Giudici  
View profile  
 More options Mar 23 2012, 5:48 pm
From: "Fabrizio Giudici" <Fabrizio.Giud...@tidalwave.it>
Date: Fri, 23 Mar 2012 22:48:27 +0100
Local: Fri, Mar 23 2012 5:48 pm
Subject: Re: [The Java Posse] Cross-build injection attacks (using Maven et al.)

On Fri, 23 Mar 2012 22:21:20 +0100, Greg Reddin <gred...@gmail.com> wrote:
> On Fri, Mar 23, 2012 at 3:09 PM, Sander Mak <sander...@gmail.com> wrote:

> This is where organizations like the Apache Software Foundation are
> helpful. Apache frowns upon projects that don't make releases every so
> often, so you're likely to have a somewhat recent release of an apache
> product. It's up to you and your dependent software projects to ensure
> you're using the later releases.

Really? For instance, Apache Batik latest release (1.7) is from Jan 2008,  
AFAIK (even though I see commits up to nine months ago):

http://xmlgraphics.apache.org/batik/download.cgi

> But in the end, we can't rely on Maven, Nexus, Apache, nor anyone else
> to do our due diligence for us. If our project includes a few dozen
> jars pulled in from who knows where (as do most) we must check the
> provenance of the bits we're including. Who does that? I know I don't
> do that enough.

Premising that it's really an interesting thread, I don't think Maven (or  
similar tools which auto-download dependencies) has got a specific  
problem. If you build with And and download libraries in a manual mode,  
you're experiencing the same risks. The problem, in fact, is downloading  
stuff, not the way you do. At least Maven centralizes the process and you  
can do something - I mean you can set up checks in a standard way for  
everything you need, instead of being forced to manually e.g. check  
fingerprints searching for reference values in hundreds of different  
places. As Sander said, then it's up to you to do the due diligence.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
fabrizio.giud...@tidalwave.it
http://tidalwave.it - http://fabriziogiudici.it


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sander Mak  
View profile  
 More options Mar 26 2012, 7:01 am
From: Sander Mak <sander...@gmail.com>
Date: Mon, 26 Mar 2012 04:01:27 -0700 (PDT)
Local: Mon, Mar 26 2012 7:01 am
Subject: Re: [The Java Posse] Cross-build injection attacks (using Maven et al.)

On Friday, March 23, 2012 10:21:20 PM UTC+1, greddin wrote:

> On Fri, Mar 23, 2012 at 3:09 PM, Sander Mak wrote:
> > What do you guys do in practice to prevent this? Does anyone have
> real-life
> > experience with such an attack?

> I think you raise some really good questions here, some that I've
> thought about before, but skipped over because "I don't have time to
> think about those things" :-)

Right, that sounds all too familiar :)

> This is where organizations like the Apache Software Foundation are
> helpful. Apache frowns upon projects that don't make releases every so
> often, so you're likely to have a somewhat recent release of an apache
> product. It's up to you and your dependent software projects to ensure
> you're using the later releases.

Right, but that does not necessarily solve the distribution/verification
problem. Another company I've run in to that can help curating OSS is
BlackDuck (http://www.blackducksoftware.com/management-of-open-source),
however I've yet to see it in practice anywhere.

> As an aside, do you know if Artifactory contains the PGP checking

> feature that Nexus does? We've been using the open-source version of
> Nexus and are in the process of switching to the pro version of
> Artifactory.

I'm not sure, but a cursory glance through Google did not turn up any
supporting evidence...

Regards,

Sander

--
Twitter: @Sander_Mak
Blog: http://branchandbound.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabrizio Giudici  
View profile  
 More options Mar 26 2012, 8:17 am
From: "Fabrizio Giudici" <Fabrizio.Giud...@tidalwave.it>
Date: Mon, 26 Mar 2012 13:17:29 +0100
Local: Mon, Mar 26 2012 8:17 am
Subject: Re: [The Java Posse] Cross-build injection attacks (using Maven et al.)

On Mon, 26 Mar 2012 12:01:27 +0100, Sander Mak <sander...@gmail.com> wrote:
> Right, but that does not necessarily solve the distribution/verification
> problem. Another company I've run in to that can help curating OSS is
> BlackDuck (http://www.blackducksoftware.com/management-of-open-source),
> however I've yet to see it in practice anywhere.

BlackDuck product suite goes beyond mere verification of integrity, but  
also takes care of issues such as IP management. For instance, you might  
be sure that you're only using code which is released through the Apache  
License and not the GPL because you want to avoid virality, as you've  
manually or automatically checked all the licenses of all the used  
artifacts. But this doesn't exclude that some lines of code of a certain  
artifact licensed through ASF have been indeed copied from a GPL project  
(let's see the Oracle vs Google example for an extreme case). BlackDuck  
offers a service based on sophisticated code chunk analysis in order to  
find out problems such as the one I've described.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
fabrizio.giud...@tidalwave.it
http://tidalwave.it - http://fabriziogiudici.it


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sander Mak  
View profile  
 More options Aug 22 2012, 3:59 am
From: Sander Mak <sander...@gmail.com>
Date: Wed, 22 Aug 2012 00:59:11 -0700 (PDT)
Local: Wed, Aug 22 2012 3:59 am
Subject: Re: Cross-build injection attacks (using Maven et al.)

For anyone interested in this discussion, I also posted a follow-up on how
to actually verify Maven dependencies
http://branchandbound.net/blog/security/2012/08/verify-dependencies-u...

The situation is pretty dire as you can see: none of the Maven based build
tools integrate this verification into their workflow, so it's all manual
(or use the commercial Nexus Pro repo manager).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabrizio Giudici  
View profile   Translate to Translated (View Original)
 More options Aug 22 2012, 4:12 am
From: "Fabrizio Giudici" <Fabrizio.Giud...@tidalwave.it>
Date: Wed, 22 Aug 2012 10:12:11 +0200
Local: Wed, Aug 22 2012 4:12 am
Subject: Re: [The Java Posse] Re: Cross-build injection attacks (using Maven et al.)

On Wed, 22 Aug 2012 09:59:11 +0200, Sander Mak <sander...@gmail.com> wrote:
> For anyone interested in this discussion, I also posted a follow-up on  
> how
> to actually verify Maven dependencies
> http://branchandbound.net/blog/security/2012/08/verify-dependencies-u...
> The situation is pretty dire as you can see: none of the Maven based  
> build
> tools integrate this verification into their workflow, so it's all manual
> (or use the commercial Nexus Pro repo manager).

Very valuable stuff, Sander. I think that the scripting solution you  
propose could be as well used with a free Nexus installation, by having  
the script running against the raw filesystem where Nexus stores stuff,  
with a crontab. It's not the best approach, of course, but it's the first  
automated solution that comes to my mind and provides actual protection.

The further step could be to provide those functions in a Maven plugin, so  
everybody could at least run some security check on his own local repo.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
fabrizio.giud...@tidalwave.it
http://tidalwave.it - http://fabriziogiudici.it


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Goyvaerts  
View profile  
 More options Aug 22 2012, 4:13 am
From: Jan Goyvaerts <java.arti...@gmail.com>
Date: Wed, 22 Aug 2012 10:13:48 +0200
Local: Wed, Aug 22 2012 4:13 am
Subject: Re: [The Java Posse] Re: Cross-build injection attacks (using Maven et al.)

Is there a possibility to sign it digitally - as for the linux repositories
?

On Wed, Aug 22, 2012 at 10:12 AM, Fabrizio Giudici <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »