Skip to content

Commit e877d73

Browse files
author
Brent Cook
committed
initial metasploit omnibus packager
0 parents  commit e877d73

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2776
-0
lines changed

.DS_Store

8 KB
Binary file not shown.

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.gem
2+
.bundle
3+
.kitchen/
4+
.kitchen.local.yml
5+
vendor/bundle
6+
pkg/*
7+
.vagrant
8+
bin/*
9+
files/**/cache/
10+
vendor/cookbooks

.kitchen.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
driver:
2+
name: vagrant
3+
forward_agent: yes
4+
customize:
5+
cpus: 2
6+
memory: 2048
7+
synced_folders:
8+
- ['.', '/home/vagrant/metasploit']
9+
10+
provisioner:
11+
name: chef_zero
12+
require_chef_omnibus: 11.16.4
13+
14+
platforms:
15+
- name: centos-7.0
16+
run_list: yum-epel::default
17+
- name: centos-6.5
18+
run_list: yum-epel::default
19+
- name: centos-5.10
20+
run_list: yum-epel::default
21+
- name: debian-7.2.0
22+
run_list: apt::default
23+
- name: debian-6.0.8
24+
run_list: apt::default
25+
- name: freebsd-10.0
26+
run_list: freebsd::portsnap
27+
- name: freebsd-9.2
28+
run_list:
29+
- freebsd::portsnap
30+
- freebsd::pkgng
31+
- name: ubuntu-14.04
32+
run_list: apt::default
33+
- name: ubuntu-12.04
34+
run_list: apt::default
35+
- name: ubuntu-11.04
36+
run_list: apt::default
37+
- name: ubuntu-10.04
38+
run_list: apt::default
39+
40+
suites:
41+
- name: default
42+
run_list: omnibus::default
43+
attributes:
44+
omnibus:
45+
build_user: vagrant
46+
build_user_group: vagrant
47+
build_user_password: vagrant
48+
install_dir: /opt/metasploit

Berksfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
source 'https://api.berkshelf.com'
2+
3+
cookbook 'omnibus'
4+
5+
# Uncomment to use the latest version of the Omnibus cookbook from GitHub
6+
# cookbook 'omnibus', github: 'opscode-cookbooks/omnibus'
7+
8+
group :integration do
9+
cookbook 'apt', '~> 2.3'
10+
cookbook 'freebsd', '~> 0.1'
11+
cookbook 'yum-epel', '~> 0.3'
12+
end

Gemfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
source 'https://rubygems.org'
2+
3+
# Install omnibus
4+
gem 'omnibus', '~> 4.0'
5+
6+
# Use Chef's software definitions. It is recommended that you write your own
7+
# software definitions, but you can clone/fork Chef's to get you started.
8+
# gem 'omnibus-software', github: 'opscode/omnibus-software'
9+
10+
# This development group is installed by default when you run `bundle install`,
11+
# but if you are using Omnibus in a CI-based infrastructure, you do not need
12+
# the Test Kitchen-based build lab. You can skip these unnecessary dependencies
13+
# by running `bundle install --without development` to speed up build times.
14+
group :development do
15+
# Use Berkshelf for resolving cookbook dependencies
16+
gem 'berkshelf', '~> 3.0'
17+
18+
# Use Test Kitchen with Vagrant for converging the build environment
19+
gem 'test-kitchen', '~> 1.2'
20+
gem 'kitchen-vagrant', '~> 0.14'
21+
end

Gemfile.lock

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.3.7)
5+
berkshelf (3.2.3)
6+
addressable (~> 2.3.4)
7+
berkshelf-api-client (~> 1.2)
8+
buff-config (~> 1.0)
9+
buff-extensions (~> 1.0)
10+
buff-shell_out (~> 0.1)
11+
celluloid (~> 0.16.0)
12+
celluloid-io (~> 0.16.1)
13+
cleanroom (~> 1.0)
14+
faraday (~> 0.9.0)
15+
minitar (~> 0.5.4)
16+
octokit (~> 3.0)
17+
retryable (~> 2.0)
18+
ridley (~> 4.0)
19+
solve (~> 1.1)
20+
thor (~> 0.19)
21+
berkshelf-api-client (1.2.1)
22+
faraday (~> 0.9.0)
23+
buff-config (1.0.1)
24+
buff-extensions (~> 1.0)
25+
varia_model (~> 0.4)
26+
buff-extensions (1.0.0)
27+
buff-ignore (1.1.1)
28+
buff-ruby_engine (0.1.0)
29+
buff-shell_out (0.2.0)
30+
buff-ruby_engine (~> 0.1.0)
31+
celluloid (0.16.0)
32+
timers (~> 4.0.0)
33+
celluloid-io (0.16.2)
34+
celluloid (>= 0.16.0)
35+
nio4r (>= 1.1.0)
36+
chef-sugar (2.5.0)
37+
cleanroom (1.0.0)
38+
dep-selector-libgecode (1.0.2)
39+
dep_selector (1.0.3)
40+
dep-selector-libgecode (~> 1.0)
41+
ffi (~> 1.9)
42+
erubis (2.7.0)
43+
faraday (0.9.1)
44+
multipart-post (>= 1.2, < 3)
45+
ffi (1.9.6)
46+
ffi-yajl (1.4.0)
47+
ffi (~> 1.5)
48+
libyajl2 (~> 1.2)
49+
hashie (2.1.2)
50+
hitimes (1.2.2)
51+
ipaddress (0.8.0)
52+
json (1.8.2)
53+
kitchen-vagrant (0.15.0)
54+
test-kitchen (~> 1.0)
55+
libyajl2 (1.2.0)
56+
mime-types (1.25.1)
57+
minitar (0.5.4)
58+
mixlib-authentication (1.3.0)
59+
mixlib-log
60+
mixlib-cli (1.5.0)
61+
mixlib-config (2.1.0)
62+
mixlib-log (1.6.0)
63+
mixlib-shellout (1.6.1)
64+
multipart-post (2.0.0)
65+
net-http-persistent (2.9.4)
66+
net-scp (1.2.1)
67+
net-ssh (>= 2.6.5)
68+
net-ssh (2.9.2)
69+
nio4r (1.1.0)
70+
octokit (3.8.0)
71+
sawyer (~> 0.6.0, >= 0.5.3)
72+
ohai (7.4.1)
73+
ffi (~> 1.9)
74+
ffi-yajl (~> 1.1)
75+
ipaddress
76+
mime-types (~> 1.16)
77+
mixlib-cli
78+
mixlib-config (~> 2.0)
79+
mixlib-log
80+
mixlib-shellout (~> 1.2)
81+
systemu (~> 2.6.4)
82+
wmi-lite (~> 1.0)
83+
omnibus (4.0.0)
84+
chef-sugar (~> 2.2)
85+
cleanroom (~> 1.0)
86+
mixlib-shellout (~> 1.4)
87+
ohai (~> 7.2)
88+
thor (~> 0.18)
89+
uber-s3
90+
retryable (2.0.1)
91+
ridley (4.1.2)
92+
addressable
93+
buff-config (~> 1.0)
94+
buff-extensions (~> 1.0)
95+
buff-ignore (~> 1.1)
96+
buff-shell_out (~> 0.1)
97+
celluloid (~> 0.16.0)
98+
celluloid-io (~> 0.16.1)
99+
erubis
100+
faraday (~> 0.9.0)
101+
hashie (>= 2.0.2, < 3.0.0)
102+
json (>= 1.7.7)
103+
mixlib-authentication (>= 1.3.0)
104+
net-http-persistent (>= 2.8)
105+
retryable (>= 2.0.0)
106+
semverse (~> 1.1)
107+
varia_model (~> 0.4)
108+
safe_yaml (1.0.4)
109+
sawyer (0.6.0)
110+
addressable (~> 2.3.5)
111+
faraday (~> 0.8, < 0.10)
112+
semverse (1.2.1)
113+
solve (1.2.1)
114+
dep_selector (~> 1.0)
115+
semverse (~> 1.1)
116+
systemu (2.6.4)
117+
test-kitchen (1.3.1)
118+
mixlib-shellout (>= 1.2, < 3.0)
119+
net-scp (~> 1.1)
120+
net-ssh (~> 2.7)
121+
safe_yaml (~> 1.0)
122+
thor (~> 0.18)
123+
thor (0.19.1)
124+
timers (4.0.1)
125+
hitimes
126+
uber-s3 (0.2.4)
127+
mime-types (~> 1.17)
128+
varia_model (0.4.0)
129+
buff-extensions (~> 1.0)
130+
hashie (>= 2.0.2, < 3.0.0)
131+
wmi-lite (1.0.0)
132+
133+
PLATFORMS
134+
ruby
135+
136+
DEPENDENCIES
137+
berkshelf (~> 3.0)
138+
kitchen-vagrant (~> 0.14)
139+
omnibus (~> 4.0)
140+
test-kitchen (~> 1.2)

README.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
metasploit Omnibus project
2+
==========================
3+
This project creates full-stack platform-specific packages for
4+
`metasploit`!
5+
6+
Installation
7+
------------
8+
You must have a sane Ruby 1.9+ environment with Bundler installed. Ensure all
9+
the required gems are installed:
10+
11+
```shell
12+
$ bundle install --binstubs
13+
```
14+
15+
Usage
16+
-----
17+
### Build
18+
19+
You create a platform-specific package using the `build project` command:
20+
21+
```shell
22+
$ bin/omnibus build metasploit
23+
```
24+
25+
The platform/architecture type of the package created will match the platform
26+
where the `build project` command is invoked. For example, running this command
27+
on a MacBook Pro will generate a Mac OS X package. After the build completes
28+
packages will be available in the `pkg/` folder.
29+
30+
### Clean
31+
32+
You can clean up all temporary files generated during the build process with
33+
the `clean` command:
34+
35+
```shell
36+
$ bin/omnibus clean metasploit
37+
```
38+
39+
Adding the `--purge` purge option removes __ALL__ files generated during the
40+
build including the project install directory (`/opt/metasploit`) and
41+
the package cache directory (`/var/cache/omnibus/pkg`):
42+
43+
```shell
44+
$ bin/omnibus clean metasploit --purge
45+
```
46+
47+
### Publish
48+
49+
Omnibus has a built-in mechanism for releasing to a variety of "backends", such
50+
as Amazon S3. You must set the proper credentials in your `omnibus.rb` config
51+
file or specify them via the command line.
52+
53+
```shell
54+
$ bin/omnibus publish path/to/*.deb --backend s3
55+
```
56+
57+
### Help
58+
59+
Full help for the Omnibus command line interface can be accessed with the
60+
`help` command:
61+
62+
```shell
63+
$ bin/omnibus help
64+
```
65+
66+
Kitchen-based Build Environment
67+
-------------------------------
68+
Every Omnibus project ships will a project-specific
69+
[Berksfile](http://berkshelf.com/) that will allow you to build your omnibus projects on all of the projects listed
70+
in the `.kitchen.yml`. You can add/remove additional platforms as needed by
71+
changing the list found in the `.kitchen.yml` `platforms` YAML stanza.
72+
73+
This build environment is designed to get you up-and-running quickly. However,
74+
there is nothing that restricts you to building on other platforms. Simply use
75+
the [omnibus cookbook](https://github.com/opscode-cookbooks/omnibus) to setup
76+
your desired platform and execute the build steps listed above.
77+
78+
The default build environment requires Test Kitchen and VirtualBox for local
79+
development. Test Kitchen also exposes the ability to provision instances using
80+
various cloud providers like AWS, DigitalOcean, or OpenStack. For more
81+
information, please see the [Test Kitchen documentation](http://kitchen.ci).
82+
83+
Once you have tweaked your `.kitchen.yml` (or `.kitchen.local.yml`) to your
84+
liking, you can bring up an individual build environment using the `kitchen`
85+
command.
86+
87+
```shell
88+
$ bin/kitchen converge ubuntu-1204
89+
```
90+
91+
Then login to the instance and build the project as described in the Usage
92+
section:
93+
94+
```shell
95+
$ bundle exec kitchen login ubuntu-1204
96+
[vagrant@ubuntu...] $ cd metasploit
97+
[vagrant@ubuntu...] $ bundle install
98+
[vagrant@ubuntu...] $ ...
99+
[vagrant@ubuntu...] $ bin/omnibus build metasploit
100+
```
101+
102+
For a complete list of all commands and platforms, run `kitchen list` or
103+
`kitchen help`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--- libiconv-1.14/srclib/stdio.in.h.orig 2014-07-02 01:49:41.484192961 +0000
2+
+++ libiconv-1.14/srclib/stdio.in.h 2014-07-02 01:51:10.433127793 +0000
3+
@@ -679,26 +679,6 @@
4+
# endif
5+
#endif
6+
7+
-#if @GNULIB_GETS@
8+
-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
9+
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
10+
-# undef gets
11+
-# define gets rpl_gets
12+
-# endif
13+
-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
14+
-_GL_CXXALIAS_RPL (gets, char *, (char *s));
15+
-# else
16+
-_GL_CXXALIAS_SYS (gets, char *, (char *s));
17+
-# undef gets
18+
-# endif
19+
-_GL_CXXALIASWARN (gets);
20+
-/* It is very rare that the developer ever has full control of stdin,
21+
- so any use of gets warrants an unconditional warning. Assume it is
22+
- always declared, since it is required by C89. */
23+
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
24+
-#endif
25+
-
26+
-
27+
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
28+
struct obstack;
29+
/* Grow an obstack with formatted output. Return the number of
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- configure.after.pkgin.patches 2012-12-17 01:06:16.964187316 +0000
2+
+++ configure 2012-12-17 01:07:17.046932230 +0000
3+
@@ -7864,7 +7864,7 @@
4+
else
5+
echo "$as_me: failed program was:" >&5
6+
cat conftest.$ac_ext >&5
7+
-cf_result=yes
8+
+cf_result=no
9+
fi
10+
rm -f conftest.$ac_objext conftest.$ac_ext
11+
echo "$as_me:7863: result: $cf_result" >&5

0 commit comments

Comments
 (0)