one_gadget 1.7.4 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/one_gadget/abi.rb +2 -2
- data/lib/one_gadget/builds/libc-2.19-df559a150829d9f3cdd0b5ce1e5b4d512d20f55f.rb +1 -1
- data/lib/one_gadget/builds/libc-2.20-398115bd423958b1769317a6f7e4928df141eb57.rb +1 -1
- data/lib/one_gadget/builds/libc-2.20-f3063b7115d5a383189937852ce356f4c60fd190.rb +1 -1
- data/lib/one_gadget/builds/libc-2.21-9ac81172d5ff96f40d984fe7c10073a98f1a6b2e.rb +1 -1
- data/lib/one_gadget/builds/libc-2.21-f0c24219cbba0605e39e02123398437c5dbbb104.rb +1 -1
- data/lib/one_gadget/builds/libc-2.22-b916e3c1d80069d0209f6376b33e42b75ec49eda.rb +1 -1
- data/lib/one_gadget/builds/libc-2.23-18f761287ed46e213bec29c2e440e73fd72373be.rb +46 -0
- data/lib/one_gadget/builds/libc-2.23-30773be8cf5bfed9d910c8473dd44eaab2e705ab.rb +46 -0
- data/lib/one_gadget/builds/libc-2.23-635101aec7213fdc442419bf65a92047a862ff32.rb +46 -0
- data/lib/one_gadget/builds/libc-2.23-f2f2f2af4f3e8597cca1fdff1008a834c78de42b.rb +43 -0
- data/lib/one_gadget/builds/libc-2.24-349119af9e223829ea24f6b7226bdff0182e73f2.rb +49 -0
- data/lib/one_gadget/builds/libc-2.24-3fce81d490804af9759c70bf197380bc05a584c2.rb +46 -0
- data/lib/one_gadget/builds/libc-2.24-a51ace667ccae6a8887837efb18259a906704bed.rb +46 -0
- data/lib/one_gadget/builds/libc-2.24-deefae132c5a39ba892bc189edd91f73c1ea1f14.rb +37 -0
- data/lib/one_gadget/builds/libc-2.25-58c735bc7b19b0aeb395cce70cf63bd62ac75e4a.rb +9 -0
- data/lib/one_gadget/builds/libc-2.26-1c39b3b3faa2a2cbb0fa0b6845b29332562262d3.rb +9 -0
- data/lib/one_gadget/builds/libc-2.26-6d2b609f0c8e7b338f767b08c5ac712fac809d31.rb +9 -0
- data/lib/one_gadget/builds/libc-2.26-ddcc13122ddbfe5e5ef77d4ebe66d124ae5762c2.rb +9 -0
- data/lib/one_gadget/builds/libc-2.26-fb587bc4429e7d1b0de31a3b9ee8ae78ee797eb0.rb +9 -0
- data/lib/one_gadget/builds/libc-2.27-14cd15d2eb0bc25c89045873cf807f7533e4788d.rb +47 -0
- data/lib/one_gadget/builds/libc-2.27-71f0f3074a929e519e85f6a5c03a7d1fd976bfe4.rb +44 -0
- data/lib/one_gadget/builds/libc-2.27-73cd526a553b3b47c6dd0d6dc62175263cdc646e.rb +35 -0
- data/lib/one_gadget/builds/libc-2.27-9dd0bb57f81671704475d1e5163405f7b4d4b454.rb +3 -0
- data/lib/one_gadget/builds/libc-2.27-a5e88eb34369fb48113b9eda7a92e07b372f3cb7.rb +35 -0
- data/lib/one_gadget/builds/libc-2.27-ba63c4a5f5c2b51e6e7e5df94017dc98b20e397a.rb +47 -0
- data/lib/one_gadget/builds/libc-2.27-ce450eb01a5e5acc7ce7b8c2633b02cc1093339e.rb +44 -0
- data/lib/one_gadget/builds/libc-2.27-d1237c55f6778f53b369cf22ff81979b2fe340bb.rb +3 -0
- data/lib/one_gadget/builds/libc-2.27-d831493b564a8632d1da5cc0fe44af45713cfeb6.rb +47 -0
- data/lib/one_gadget/builds/libc-2.27-f4929d2a8af4629477103af6f1cfb3bebce80883.rb +47 -0
- data/lib/one_gadget/builds/libc-2.28-5b157f49586a3ca84d55837f97ff466767dd3445.rb +12 -0
- data/lib/one_gadget/builds/libc-2.28-65ed813688b116fdce9e866ad2fef2e734167337.rb +44 -0
- data/lib/one_gadget/builds/libc-2.28-6ee9454b96efa9e343f9e8105f2fa4529265ea05.rb +6 -0
- data/lib/one_gadget/builds/libc-2.29-5b7203920d3d786ac40af8e0d5104683335f11be.rb +50 -0
- data/lib/one_gadget/builds/libc-2.29-85d5020664b11fd2708859275de41d5ab9d104cf.rb +18 -0
- data/lib/one_gadget/builds/libc-2.29-a8af6c81cb28a37bf3a546970bf64224402f8bd4.rb +50 -0
- data/lib/one_gadget/builds/libc-2.29-c19c88c33b60742ca906e0f9f96fe31b8b79ea9c.rb +50 -0
- data/lib/one_gadget/builds/libc-2.29-d561ec515222887a1e004555981169199d841024.rb +27 -0
- data/lib/one_gadget/builds/libc-2.30-2155f455ad56bd871c8225bcca85ee25c1c197c4.rb +36 -0
- data/lib/one_gadget/builds/libc-2.30-33d1f350f13728651d74dd2a56bad1e4e4648f5e.rb +50 -0
- data/lib/one_gadget/builds/libc-2.30-7a1e2ae26cef50584af2c60a5ad3a7ae3e9b1446.rb +50 -0
- data/lib/one_gadget/builds/libc-2.30-cbe9cff3c43b979739af1681b61a3d585725577b.rb +36 -0
- data/lib/one_gadget/builds/libc-2.30-f07144cc3d0ac50415f3a2e061be6da672c914ba.rb +18 -0
- data/lib/one_gadget/builds/libc-2.30-f44469d65b4efd2e5951513ed7cbf773657f1283.rb +18 -0
- data/lib/one_gadget/builds/libc-2.31-012f3f1e614cb9c829b8d1590d228cc6a9506a03.rb +26 -0
- data/lib/one_gadget/builds/libc-2.31-099b9225bcb0d019d9d60884be583eb31bb5f44e.rb +80 -0
- data/lib/one_gadget/builds/libc-2.31-0d1b3211736c4ca528a32ea0d565d41a2ede3b58.rb +56 -0
- data/lib/one_gadget/builds/libc-2.31-12e412d1938ec3ff79751f0e85f31bc52f7e3722.rb +56 -0
- data/lib/one_gadget/builds/libc-2.31-2886817dc06a87bdeef50544c0d6c12de13a8148.rb +56 -0
- data/lib/one_gadget/builds/libc-2.31-4d4d0853eb075b8b0cfaee0aee7cdf4254a3e877.rb +56 -0
- data/lib/one_gadget/builds/libc-2.31-58a58f2fcdafddacb4a08439ea2ee163ff645d1d.rb +26 -0
- data/lib/one_gadget/builds/libc-2.31-634252e0c5f8b03957a2e529719d4101699a894a.rb +48 -0
- data/lib/one_gadget/builds/libc-2.31-6b143503744b9d6c22e479941488d6a9e6e3f1c5.rb +26 -0
- data/lib/one_gadget/builds/libc-2.31-6dbad1709854c527793f6401666e45a791b7c793.rb +56 -0
- data/lib/one_gadget/builds/libc-2.31-85d7bb2dad0f8172d1c02c0311a00c4695933beb.rb +26 -0
- data/lib/one_gadget/builds/libc-2.31-8629fa2eea681f639a0c18305d4548850dde3450.rb +26 -0
- data/lib/one_gadget/builds/libc-2.31-94761ae31db09ce9140ca55cb6986a5ea9110abc.rb +56 -0
- data/lib/one_gadget/builds/libc-2.31-9fdb74e7b217d06c93172a8243f8547f947ee6d1.rb +80 -0
- data/lib/one_gadget/builds/libc-2.31-c9d56de82ddd00d822d6100034f3075ef1709cd2.rb +80 -0
- data/lib/one_gadget/builds/libc-2.31-e67e80e70619717709e3180e552a11a285036a54.rb +56 -0
- data/lib/one_gadget/builds/libc-2.31-eb3c5cf73a0a6b7f2b3895a56dbc443806700971.rb +30 -0
- data/lib/one_gadget/builds/libc-2.31-fb7626dd8b8a50f7685920487e992528834f6775.rb +26 -0
- data/lib/one_gadget/builds/libc-2.32-1e3fb06b8c86b5e282e3e11bd207d399fb4952e2.rb +83 -0
- data/lib/one_gadget/builds/libc-2.32-7ec3e74da842ca3c6a9ba20b21303ce1bc7a45af.rb +51 -0
- data/lib/one_gadget/builds/libc-2.32-7fba7abef941659c229c2636aa0905c28652ee3f.rb +56 -0
- data/lib/one_gadget/builds/libc-2.32-82f6b69e698bb579baefb35a3fb0346632fa2c4d.rb +83 -0
- data/lib/one_gadget/builds/libc-2.32-87f011a7e4cc3fc60a54d0d3dd690e7438decc8d.rb +56 -0
- data/lib/one_gadget/builds/libc-2.32-92199dd358616182fb49c992330fb05e42eaa423.rb +26 -0
- data/lib/one_gadget/builds/libc-2.32-9d60d4bd625a7fe2439db781a5fc91bb69684903.rb +26 -0
- data/lib/one_gadget/builds/libc-2.32-ac287babd169c70013b752da2713dfb96d9a503f.rb +83 -0
- data/lib/one_gadget/builds/libc-2.32-aebd80372a00285a5c486ef72917f935eb8f91be.rb +26 -0
- data/lib/one_gadget/builds/libc-2.32-bd0e9dc4e27475b5ab7dc59141daaa2626b8a760.rb +26 -0
- data/lib/one_gadget/builds/libc-2.32-bddeb6374fc99723cef3b3baafe48ac78fce13b4.rb +26 -0
- data/lib/one_gadget/builds/libc-2.32-cb91dd613d38b806a16bed1b364c084ad63d1a1f.rb +56 -0
- data/lib/one_gadget/builds/libc-2.32-d3f1cf7f55b985fd6d989880ec3599724fe40a26.rb +26 -0
- data/lib/one_gadget/builds/libc-2.32-e13b24f94b260dd6394bdb2433d2a78e37078d5c.rb +30 -0
- data/lib/one_gadget/builds/libc-2.32-e1596c76d0d93d8a36378ba976f034f140618d59.rb +56 -0
- data/lib/one_gadget/builds/libc-2.32-f45b67ab28af1581cba8e4713e0fd3b2bc004b2e.rb +56 -0
- data/lib/one_gadget/builds/libc-2.33-18edf6b683a2f9768cc0ee9cc64ae6fbb545deb2.rb +83 -0
- data/lib/one_gadget/builds/libc-2.33-1c943bf313b5b4546e47b830e70de6bbd6a0ba57.rb +26 -0
- data/lib/one_gadget/builds/libc-2.33-2b48299781548c9bc452eac6df39902547c884ed.rb +83 -0
- data/lib/one_gadget/builds/libc-2.33-37169e68b33cad12e272bb4896d71fd0d4fd98bb.rb +56 -0
- data/lib/one_gadget/builds/libc-2.33-54a6e404e7dc1de7c1434a00b7b1ad325b81f22a.rb +56 -0
- data/lib/one_gadget/builds/libc-2.33-7983d313db4a441a3762c8861ca405aa0331c0c8.rb +56 -0
- data/lib/one_gadget/builds/libc-2.33-8fdc2b2c65f3d782e52c01b546399eee8aa466dc.rb +26 -0
- data/lib/one_gadget/builds/libc-2.33-9143da129b44b931a1c180e2b103e993dd2474fd.rb +26 -0
- data/lib/one_gadget/builds/libc-2.33-97c8d90bd86bc698d156630e8803de433a640090.rb +83 -0
- data/lib/one_gadget/builds/libc-2.33-9bf4c513db255ab7248cef9f0f96b4403df29852.rb +56 -0
- data/lib/one_gadget/builds/libc-2.33-9e592d3efa165bc2bab8b40426370bd50cb0b027.rb +56 -0
- data/lib/one_gadget/builds/libc-2.33-abf3b2a9815c0cd6e4280cd99474d34102804eb2.rb +56 -0
- data/lib/one_gadget/builds/libc-2.33-b046eecd056a0c30995703f6cfca7a8e3a9ef5fa.rb +56 -0
- data/lib/one_gadget/builds/libc-2.33-b2262bfa6f1bffd1e9ddc845276dfaebb7c8f0b9.rb +26 -0
- data/lib/one_gadget/builds/libc-2.33-f462ab2b79c7f29fb866da6e087e45261570a09c.rb +26 -0
- data/lib/one_gadget/builds/libc-2.33-f4af69206091c7f14a941f2dd77a79a7682a1184.rb +26 -0
- data/lib/one_gadget/builds/libc-2.34-140609514178a4bb96a3cd44ffdfede398a77610.rb +26 -0
- data/lib/one_gadget/builds/libc-2.34-25594d4b6cbecda86ec968fa940c6c09937db70f.rb +50 -0
- data/lib/one_gadget/builds/libc-2.34-387920279e1c7892042ff27d76315d55e4651db9.rb +26 -0
- data/lib/one_gadget/builds/libc-2.34-7e46fbc4d85f5df8b6f18630787ad281786a3512.rb +26 -0
- data/lib/one_gadget/builds/libc-2.34-8d631c824a37b236d1dc9686b224a573fd6048b4.rb +26 -0
- data/lib/one_gadget/builds/libc-2.34-b8037b6260865346802321dd2256b8ad1d857e63.rb +68 -0
- data/lib/one_gadget/builds/libc-2.34-ba4777827fe1fb729ca35acd99c8013936172a0d.rb +50 -0
- data/lib/one_gadget/builds/libc-2.34-f0fc29165cbe6088c0e1adf03b0048fbecbc003a.rb +68 -0
- data/lib/one_gadget/builds/libc-2.35-89c3cb85f9e55046776471fed05ec441581d1969.rb +62 -0
- data/lib/one_gadget/builds/libc-2.35-ab265082cac9486923c709d48ee5dde080e243ff.rb +41 -0
- data/lib/one_gadget/builds/libc-2.35-c376d41cff4473142a97ac1ff1eab433859dc3d4.rb +26 -0
- data/lib/one_gadget/builds/libc-2.35-dfca8b65dd2d2ca67f70dc7a556a6cfa8ba96ed8.rb +26 -0
- data/lib/one_gadget/cli.rb +1 -1
- data/lib/one_gadget/emulators/aarch64.rb +7 -8
- data/lib/one_gadget/emulators/amd64.rb +3 -0
- data/lib/one_gadget/emulators/lambda.rb +12 -4
- data/lib/one_gadget/emulators/processor.rb +9 -1
- data/lib/one_gadget/emulators/x86.rb +42 -19
- data/lib/one_gadget/fetchers/amd64.rb +2 -1
- data/lib/one_gadget/fetchers/base.rb +65 -34
- data/lib/one_gadget/gadget.rb +9 -5
- data/lib/one_gadget/update.rb +2 -2
- data/lib/one_gadget/version.rb +1 -1
- metadata +91 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 698ac48e3e7980de7f6c1b5b8bb4085a0466702cd80a427c33612191b6bda47c
|
4
|
+
data.tar.gz: 55bad01393fc60e1872becf2f0b3e9d2b92a5269683428617f8fb09d1f3776a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6069d1f1c95628d2fd5a30430ce5f3b80ddd6256a2df0d5a94bede26aa034c5e796cb0682496f94835d31b5c359f78dc42fc7e3c942305b3c3bc597d5a5c722f
|
7
|
+
data.tar.gz: 8d69884a81539655aa360af17a6c443f65985235e422a9ea45f2a693cf0dff4387436c4e4340d9160e73166dc686067a87c025a466d71623a86c9ba600895880
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/one_gadget.svg)](https://badge.fury.io/rb/one_gadget)
|
2
|
+
[![Build Status](https://github.com/david942j/one_gadget/workflows/build/badge.svg)](https://github.com/david942j/one_gadget/actions)
|
2
3
|
[![Downloads](http://ruby-gem-downloads-badge.herokuapp.com/one_gadget?type=total&color=orange)](https://rubygems.org/gems/one_gadget)
|
3
4
|
[![Code Climate](https://codeclimate.com/github/david942j/one_gadget/badges/gpa.svg)](https://codeclimate.com/github/david942j/one_gadget)
|
4
5
|
[![Issue Count](https://codeclimate.com/github/david942j/one_gadget/badges/issue_count.svg)](https://codeclimate.com/github/david942j/one_gadget)
|
@@ -339,7 +340,7 @@ one_gadget('b417c0ba7cc5cf06d1d1bed6652cedb9253c60d0')
|
|
339
340
|
```python
|
340
341
|
import subprocess
|
341
342
|
def one_gadget(filename):
|
342
|
-
return
|
343
|
+
return [int(i) for i in subprocess.check_output(['one_gadget', '--raw', filename]).decode().split(' ')]
|
343
344
|
|
344
345
|
one_gadget('/lib/x86_64-linux-gnu/libc.so.6')
|
345
346
|
#=> [324293, 324386, 1090444]
|
data/lib/one_gadget/abi.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module OneGadget
|
4
|
-
# Defines the
|
4
|
+
# Defines the ABI of different architectures.
|
5
5
|
module ABI
|
6
6
|
# Registers of i386.
|
7
7
|
X86_32 = %w[eax ebx ecx edx edi esi ebp esp] + 0.upto(7).map { |i| "xmm#{i}" }
|
@@ -19,7 +19,7 @@ module OneGadget
|
|
19
19
|
# Registers' name of amd64.
|
20
20
|
# @return [Array<String>] List of registers.
|
21
21
|
def amd64
|
22
|
-
X86_64
|
22
|
+
X86_64
|
23
23
|
end
|
24
24
|
|
25
25
|
# Registers' name of i386.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'one_gadget/gadget'
|
2
|
-
# https://gitlab.com/david942j/libcdb/blob/master/libc/glibc-2.20-
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/glibc-2.20-4-x86_64.pkg.tar/usr/lib/libc-2.20.so
|
3
3
|
#
|
4
4
|
# Advanced Micro Devices X86-64
|
5
5
|
#
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'one_gadget/gadget'
|
2
|
-
# https://gitlab.com/david942j/libcdb/blob/master/libc/glibc-2.21-
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/glibc-2.21-2-x86_64.pkg.tar/usr/lib/libc-2.21.so
|
3
3
|
#
|
4
4
|
# Advanced Micro Devices X86-64
|
5
5
|
#
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'one_gadget/gadget'
|
2
|
-
# https://gitlab.com/david942j/libcdb/blob/master/libc/lib32-glibc-2.22-3-x86_64.pkg.tar/usr/lib32/libc-2.22.so
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/lib32-glibc-2.22-3.1-x86_64.pkg.tar/usr/lib32/libc-2.22.so
|
3
3
|
#
|
4
4
|
# Intel 80386
|
5
5
|
#
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6_2.23-0ubuntu11.3_i386/lib/i386-linux-gnu/libc-2.23.so
|
3
|
+
#
|
4
|
+
# Intel 80386
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.23-0ubuntu11.3) stable release version 2.23, by Roland McGrath et al.
|
7
|
+
# Copyright (C) 2016 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 5.4.0 20160609.
|
12
|
+
# Available extensions:
|
13
|
+
# crypt add-on version 2.1 by Michael Glad and others
|
14
|
+
# GNU Libidn by Simon Josefsson
|
15
|
+
# Native POSIX Threads Library by Ulrich Drepper et al
|
16
|
+
# BIND-8.2.3-T5B
|
17
|
+
# libc ABIs: UNIQUE IFUNC
|
18
|
+
# For bug reporting instructions, please see:
|
19
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
20
|
+
|
21
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
22
|
+
OneGadget::Gadget.add(build_id, 240748,
|
23
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x28] == NULL"],
|
24
|
+
effect: "execve(\"/bin/sh\", esp+0x28, environ)")
|
25
|
+
OneGadget::Gadget.add(build_id, 240750,
|
26
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x2c] == NULL"],
|
27
|
+
effect: "execve(\"/bin/sh\", esp+0x2c, environ)")
|
28
|
+
OneGadget::Gadget.add(build_id, 240754,
|
29
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x30] == NULL"],
|
30
|
+
effect: "execve(\"/bin/sh\", esp+0x30, environ)")
|
31
|
+
OneGadget::Gadget.add(build_id, 240761,
|
32
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x34] == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", esp+0x34, environ)")
|
34
|
+
OneGadget::Gadget.add(build_id, 240796,
|
35
|
+
constraints: ["esi is the GOT address of libc", "[eax] == NULL || eax == NULL", "[[esp]] == NULL || [esp] == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", eax, [esp])")
|
37
|
+
OneGadget::Gadget.add(build_id, 240797,
|
38
|
+
constraints: ["esi is the GOT address of libc", "[[esp]] == NULL || [esp] == NULL", "[[esp+0x4]] == NULL || [esp+0x4] == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", [esp], [esp+0x4])")
|
40
|
+
OneGadget::Gadget.add(build_id, 392149,
|
41
|
+
constraints: ["esi is the GOT address of libc", "eax == NULL"],
|
42
|
+
effect: "execl(\"/bin/sh\", eax)")
|
43
|
+
OneGadget::Gadget.add(build_id, 392150,
|
44
|
+
constraints: ["esi is the GOT address of libc", "[esp] == NULL"],
|
45
|
+
effect: "execl(\"/bin/sh\", [esp])")
|
46
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6_2.23-0ubuntu11.3_amd64/lib/x86_64-linux-gnu/libc-2.23.so
|
3
|
+
#
|
4
|
+
# Advanced Micro Devices X86-64
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.23-0ubuntu11.3) stable release version 2.23, by Roland McGrath et al.
|
7
|
+
# Copyright (C) 2016 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 5.4.0 20160609.
|
12
|
+
# Available extensions:
|
13
|
+
# crypt add-on version 2.1 by Michael Glad and others
|
14
|
+
# GNU Libidn by Simon Josefsson
|
15
|
+
# Native POSIX Threads Library by Ulrich Drepper et al
|
16
|
+
# BIND-8.2.3-T5B
|
17
|
+
# libc ABIs: UNIQUE IFUNC
|
18
|
+
# For bug reporting instructions, please see:
|
19
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
20
|
+
|
21
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
22
|
+
OneGadget::Gadget.add(build_id, 283174,
|
23
|
+
constraints: ["rax == NULL"],
|
24
|
+
effect: "execve(\"/bin/sh\", rsp+0x30, environ)")
|
25
|
+
OneGadget::Gadget.add(build_id, 283258,
|
26
|
+
constraints: ["[rsp+0x30] == NULL"],
|
27
|
+
effect: "execve(\"/bin/sh\", rsp+0x30, environ)")
|
28
|
+
OneGadget::Gadget.add(build_id, 840051,
|
29
|
+
constraints: ["[rcx] == NULL || rcx == NULL", "[r12] == NULL || r12 == NULL"],
|
30
|
+
effect: "execve(\"/bin/sh\", rcx, r12)")
|
31
|
+
OneGadget::Gadget.add(build_id, 840264,
|
32
|
+
constraints: ["[rax] == NULL || rax == NULL", "[r12] == NULL || r12 == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", rax, r12)")
|
34
|
+
OneGadget::Gadget.add(build_id, 983972,
|
35
|
+
constraints: ["[rsp+0x50] == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", rsp+0x50, environ)")
|
37
|
+
OneGadget::Gadget.add(build_id, 983984,
|
38
|
+
constraints: ["[rsi] == NULL || rsi == NULL", "[[rax]] == NULL || [rax] == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", rsi, [rax])")
|
40
|
+
OneGadget::Gadget.add(build_id, 987719,
|
41
|
+
constraints: ["[rsp+0x70] == NULL"],
|
42
|
+
effect: "execve(\"/bin/sh\", rsp+0x70, environ)")
|
43
|
+
OneGadget::Gadget.add(build_id, 1009648,
|
44
|
+
constraints: ["[rcx] == NULL || rcx == NULL", "[[rbp-0xf8]] == NULL || [rbp-0xf8] == NULL"],
|
45
|
+
effect: "execve(\"/bin/sh\", rcx, [rbp-0xf8])")
|
46
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6-i386_2.23-0ubuntu11.3_amd64/lib32/libc-2.23.so
|
3
|
+
#
|
4
|
+
# Intel 80386
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.23-0ubuntu11.3) stable release version 2.23, by Roland McGrath et al.
|
7
|
+
# Copyright (C) 2016 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 5.4.0 20160609.
|
12
|
+
# Available extensions:
|
13
|
+
# crypt add-on version 2.1 by Michael Glad and others
|
14
|
+
# GNU Libidn by Simon Josefsson
|
15
|
+
# Native POSIX Threads Library by Ulrich Drepper et al
|
16
|
+
# BIND-8.2.3-T5B
|
17
|
+
# libc ABIs: UNIQUE IFUNC
|
18
|
+
# For bug reporting instructions, please see:
|
19
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
20
|
+
|
21
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
22
|
+
OneGadget::Gadget.add(build_id, 239644,
|
23
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x28] == NULL"],
|
24
|
+
effect: "execve(\"/bin/sh\", esp+0x28, environ)")
|
25
|
+
OneGadget::Gadget.add(build_id, 239646,
|
26
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x2c] == NULL"],
|
27
|
+
effect: "execve(\"/bin/sh\", esp+0x2c, environ)")
|
28
|
+
OneGadget::Gadget.add(build_id, 239650,
|
29
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x30] == NULL"],
|
30
|
+
effect: "execve(\"/bin/sh\", esp+0x30, environ)")
|
31
|
+
OneGadget::Gadget.add(build_id, 239657,
|
32
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x34] == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", esp+0x34, environ)")
|
34
|
+
OneGadget::Gadget.add(build_id, 239692,
|
35
|
+
constraints: ["esi is the GOT address of libc", "[eax] == NULL || eax == NULL", "[[esp]] == NULL || [esp] == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", eax, [esp])")
|
37
|
+
OneGadget::Gadget.add(build_id, 239693,
|
38
|
+
constraints: ["esi is the GOT address of libc", "[[esp]] == NULL || [esp] == NULL", "[[esp+0x4]] == NULL || [esp+0x4] == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", [esp], [esp+0x4])")
|
40
|
+
OneGadget::Gadget.add(build_id, 389237,
|
41
|
+
constraints: ["esi is the GOT address of libc", "eax == NULL"],
|
42
|
+
effect: "execl(\"/bin/sh\", eax)")
|
43
|
+
OneGadget::Gadget.add(build_id, 389238,
|
44
|
+
constraints: ["esi is the GOT address of libc", "[esp] == NULL"],
|
45
|
+
effect: "execl(\"/bin/sh\", [esp])")
|
46
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6-amd64_2.23-0ubuntu11.3_i386/lib64/libc-2.23.so
|
3
|
+
#
|
4
|
+
# Advanced Micro Devices X86-64
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.23-0ubuntu11.3) stable release version 2.23, by Roland McGrath et al.
|
7
|
+
# Copyright (C) 2016 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 5.4.0 20160609.
|
12
|
+
# Available extensions:
|
13
|
+
# crypt add-on version 2.1 by Michael Glad and others
|
14
|
+
# GNU Libidn by Simon Josefsson
|
15
|
+
# Native POSIX Threads Library by Ulrich Drepper et al
|
16
|
+
# BIND-8.2.3-T5B
|
17
|
+
# libc ABIs: UNIQUE IFUNC
|
18
|
+
# For bug reporting instructions, please see:
|
19
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
20
|
+
|
21
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
22
|
+
OneGadget::Gadget.add(build_id, 259286,
|
23
|
+
constraints: ["rax == NULL"],
|
24
|
+
effect: "execve(\"/bin/sh\", rsp+0x30, environ)")
|
25
|
+
OneGadget::Gadget.add(build_id, 259370,
|
26
|
+
constraints: ["[rsp+0x30] == NULL"],
|
27
|
+
effect: "execve(\"/bin/sh\", rsp+0x30, environ)")
|
28
|
+
OneGadget::Gadget.add(build_id, 753847,
|
29
|
+
constraints: ["[rsi] == NULL || rsi == NULL", "[r12] == NULL || r12 == NULL"],
|
30
|
+
effect: "execve(\"/bin/sh\", rsi, r12)")
|
31
|
+
OneGadget::Gadget.add(build_id, 754056,
|
32
|
+
constraints: ["[[rbp-0x40]] == NULL || [rbp-0x40] == NULL", "[r12] == NULL || r12 == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", [rbp-0x40], r12)")
|
34
|
+
OneGadget::Gadget.add(build_id, 875271,
|
35
|
+
constraints: ["[rsp+0x70] == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", rsp+0x70, environ)")
|
37
|
+
OneGadget::Gadget.add(build_id, 875283,
|
38
|
+
constraints: ["[rsi] == NULL || rsi == NULL", "[[rax]] == NULL || [rax] == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", rsi, [rax])")
|
40
|
+
OneGadget::Gadget.add(build_id, 890033,
|
41
|
+
constraints: ["[r9] == NULL || r9 == NULL", "[rdx] == NULL || rdx == NULL"],
|
42
|
+
effect: "execve(\"/bin/sh\", r9, rdx)")
|
43
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6_2.24-3ubuntu1_amd64/lib/x86_64-linux-gnu/libc-2.24.so
|
3
|
+
#
|
4
|
+
# Advanced Micro Devices X86-64
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.24-3ubuntu1) stable release version 2.24, by Roland McGrath et al.
|
7
|
+
# Copyright (C) 2016 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 6.2.0 20161005.
|
12
|
+
# Available extensions:
|
13
|
+
# crypt add-on version 2.1 by Michael Glad and others
|
14
|
+
# GNU Libidn by Simon Josefsson
|
15
|
+
# Native POSIX Threads Library by Ulrich Drepper et al
|
16
|
+
# BIND-8.2.3-T5B
|
17
|
+
# libc ABIs: UNIQUE IFUNC
|
18
|
+
# For bug reporting instructions, please see:
|
19
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
20
|
+
|
21
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
22
|
+
OneGadget::Gadget.add(build_id, 283990,
|
23
|
+
constraints: ["rax == NULL"],
|
24
|
+
effect: "execve(\"/bin/sh\", rsp+0x30, environ)")
|
25
|
+
OneGadget::Gadget.add(build_id, 284074,
|
26
|
+
constraints: ["[rsp+0x30] == NULL"],
|
27
|
+
effect: "execve(\"/bin/sh\", rsp+0x30, environ)")
|
28
|
+
OneGadget::Gadget.add(build_id, 840298,
|
29
|
+
constraints: ["[r15] == NULL || r15 == NULL", "[r13] == NULL || r13 == NULL"],
|
30
|
+
effect: "execve(\"/bin/sh\", r15, r13)")
|
31
|
+
OneGadget::Gadget.add(build_id, 840981,
|
32
|
+
constraints: ["[[rbp-0x78]] == NULL || [rbp-0x78] == NULL", "[[rbp-0x50]] == NULL || [rbp-0x50] == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", [rbp-0x78], [rbp-0x50])")
|
34
|
+
OneGadget::Gadget.add(build_id, 840985,
|
35
|
+
constraints: ["[r9] == NULL || r9 == NULL", "[[rbp-0x50]] == NULL || [rbp-0x50] == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", r9, [rbp-0x50])")
|
37
|
+
OneGadget::Gadget.add(build_id, 840989,
|
38
|
+
constraints: ["[r9] == NULL || r9 == NULL", "[rdx] == NULL || rdx == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", r9, rdx)")
|
40
|
+
OneGadget::Gadget.add(build_id, 985745,
|
41
|
+
constraints: ["[rsp+0x50] == NULL"],
|
42
|
+
effect: "execve(\"/bin/sh\", rsp+0x50, environ)")
|
43
|
+
OneGadget::Gadget.add(build_id, 985757,
|
44
|
+
constraints: ["[rsi] == NULL || rsi == NULL", "[[rax]] == NULL || [rax] == NULL"],
|
45
|
+
effect: "execve(\"/bin/sh\", rsi, [rax])")
|
46
|
+
OneGadget::Gadget.add(build_id, 989465,
|
47
|
+
constraints: ["[rsp+0x70] == NULL"],
|
48
|
+
effect: "execve(\"/bin/sh\", rsp+0x70, environ)")
|
49
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6-i386_2.24-3ubuntu1_amd64/lib32/libc-2.24.so
|
3
|
+
#
|
4
|
+
# Intel 80386
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.24-3ubuntu1) stable release version 2.24, by Roland McGrath et al.
|
7
|
+
# Copyright (C) 2016 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 6.2.0 20161005.
|
12
|
+
# Available extensions:
|
13
|
+
# crypt add-on version 2.1 by Michael Glad and others
|
14
|
+
# GNU Libidn by Simon Josefsson
|
15
|
+
# Native POSIX Threads Library by Ulrich Drepper et al
|
16
|
+
# BIND-8.2.3-T5B
|
17
|
+
# libc ABIs: UNIQUE IFUNC
|
18
|
+
# For bug reporting instructions, please see:
|
19
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
20
|
+
|
21
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
22
|
+
OneGadget::Gadget.add(build_id, 239484,
|
23
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x28] == NULL"],
|
24
|
+
effect: "execve(\"/bin/sh\", esp+0x28, environ)")
|
25
|
+
OneGadget::Gadget.add(build_id, 239486,
|
26
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x2c] == NULL"],
|
27
|
+
effect: "execve(\"/bin/sh\", esp+0x2c, environ)")
|
28
|
+
OneGadget::Gadget.add(build_id, 239490,
|
29
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x30] == NULL"],
|
30
|
+
effect: "execve(\"/bin/sh\", esp+0x30, environ)")
|
31
|
+
OneGadget::Gadget.add(build_id, 239497,
|
32
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x34] == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", esp+0x34, environ)")
|
34
|
+
OneGadget::Gadget.add(build_id, 239532,
|
35
|
+
constraints: ["esi is the GOT address of libc", "[eax] == NULL || eax == NULL", "[[esp]] == NULL || [esp] == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", eax, [esp])")
|
37
|
+
OneGadget::Gadget.add(build_id, 239533,
|
38
|
+
constraints: ["esi is the GOT address of libc", "[[esp]] == NULL || [esp] == NULL", "[[esp+0x4]] == NULL || [esp+0x4] == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", [esp], [esp+0x4])")
|
40
|
+
OneGadget::Gadget.add(build_id, 391205,
|
41
|
+
constraints: ["esi is the GOT address of libc", "eax == NULL"],
|
42
|
+
effect: "execl(\"/bin/sh\", eax)")
|
43
|
+
OneGadget::Gadget.add(build_id, 391206,
|
44
|
+
constraints: ["esi is the GOT address of libc", "[esp] == NULL"],
|
45
|
+
effect: "execl(\"/bin/sh\", [esp])")
|
46
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6_2.24-3ubuntu1_i386/lib/i386-linux-gnu/libc-2.24.so
|
3
|
+
#
|
4
|
+
# Intel 80386
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.24-3ubuntu1) stable release version 2.24, by Roland McGrath et al.
|
7
|
+
# Copyright (C) 2016 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 6.2.0 20161005.
|
12
|
+
# Available extensions:
|
13
|
+
# crypt add-on version 2.1 by Michael Glad and others
|
14
|
+
# GNU Libidn by Simon Josefsson
|
15
|
+
# Native POSIX Threads Library by Ulrich Drepper et al
|
16
|
+
# BIND-8.2.3-T5B
|
17
|
+
# libc ABIs: UNIQUE IFUNC
|
18
|
+
# For bug reporting instructions, please see:
|
19
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
20
|
+
|
21
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
22
|
+
OneGadget::Gadget.add(build_id, 241372,
|
23
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x28] == NULL"],
|
24
|
+
effect: "execve(\"/bin/sh\", esp+0x28, environ)")
|
25
|
+
OneGadget::Gadget.add(build_id, 241374,
|
26
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x2c] == NULL"],
|
27
|
+
effect: "execve(\"/bin/sh\", esp+0x2c, environ)")
|
28
|
+
OneGadget::Gadget.add(build_id, 241378,
|
29
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x30] == NULL"],
|
30
|
+
effect: "execve(\"/bin/sh\", esp+0x30, environ)")
|
31
|
+
OneGadget::Gadget.add(build_id, 241385,
|
32
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x34] == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", esp+0x34, environ)")
|
34
|
+
OneGadget::Gadget.add(build_id, 241420,
|
35
|
+
constraints: ["esi is the GOT address of libc", "[eax] == NULL || eax == NULL", "[[esp]] == NULL || [esp] == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", eax, [esp])")
|
37
|
+
OneGadget::Gadget.add(build_id, 241421,
|
38
|
+
constraints: ["esi is the GOT address of libc", "[[esp]] == NULL || [esp] == NULL", "[[esp+0x4]] == NULL || [esp+0x4] == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", [esp], [esp+0x4])")
|
40
|
+
OneGadget::Gadget.add(build_id, 393909,
|
41
|
+
constraints: ["esi is the GOT address of libc", "eax == NULL"],
|
42
|
+
effect: "execl(\"/bin/sh\", eax)")
|
43
|
+
OneGadget::Gadget.add(build_id, 393910,
|
44
|
+
constraints: ["esi is the GOT address of libc", "[esp] == NULL"],
|
45
|
+
effect: "execl(\"/bin/sh\", [esp])")
|
46
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6-amd64_2.24-3ubuntu1_i386/lib64/libc-2.24.so
|
3
|
+
#
|
4
|
+
# Advanced Micro Devices X86-64
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.24-3ubuntu1) stable release version 2.24, by Roland McGrath et al.
|
7
|
+
# Copyright (C) 2016 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 6.2.0 20161005.
|
12
|
+
# Available extensions:
|
13
|
+
# crypt add-on version 2.1 by Michael Glad and others
|
14
|
+
# GNU Libidn by Simon Josefsson
|
15
|
+
# Native POSIX Threads Library by Ulrich Drepper et al
|
16
|
+
# BIND-8.2.3-T5B
|
17
|
+
# libc ABIs: UNIQUE IFUNC
|
18
|
+
# For bug reporting instructions, please see:
|
19
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
20
|
+
|
21
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
22
|
+
OneGadget::Gadget.add(build_id, 258966,
|
23
|
+
constraints: ["rax == NULL"],
|
24
|
+
effect: "execve(\"/bin/sh\", rsp+0x30, environ)")
|
25
|
+
OneGadget::Gadget.add(build_id, 259050,
|
26
|
+
constraints: ["[rsp+0x30] == NULL"],
|
27
|
+
effect: "execve(\"/bin/sh\", rsp+0x30, environ)")
|
28
|
+
OneGadget::Gadget.add(build_id, 756632,
|
29
|
+
constraints: ["[r13] == NULL || r13 == NULL", "[r12] == NULL || r12 == NULL"],
|
30
|
+
effect: "execve(\"/bin/sh\", r13, r12)")
|
31
|
+
OneGadget::Gadget.add(build_id, 878901,
|
32
|
+
constraints: ["[rsp+0x70] == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", rsp+0x70, environ)")
|
34
|
+
OneGadget::Gadget.add(build_id, 878913,
|
35
|
+
constraints: ["[rsi] == NULL || rsi == NULL", "[[rax]] == NULL || [rax] == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", rsi, [rax])")
|
37
|
+
|
@@ -28,6 +28,15 @@ OneGadget::Gadget.add(build_id, 265183,
|
|
28
28
|
OneGadget::Gadget.add(build_id, 765680,
|
29
29
|
constraints: ["[r12] == NULL || r12 == NULL", "[r13] == NULL || r13 == NULL"],
|
30
30
|
effect: "execve(\"/bin/sh\", r12, r13)")
|
31
|
+
OneGadget::Gadget.add(build_id, 765738,
|
32
|
+
constraints: ["writable: rbp-0x38", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
34
|
+
OneGadget::Gadget.add(build_id, 765742,
|
35
|
+
constraints: ["writable: rbp-0x30", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
37
|
+
OneGadget::Gadget.add(build_id, 765750,
|
38
|
+
constraints: ["writable: rbp-0x40", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
31
40
|
OneGadget::Gadget.add(build_id, 890131,
|
32
41
|
constraints: ["[rsp+0x80] == NULL"],
|
33
42
|
effect: "execve(\"/bin/sh\", rsp+0x80, environ)")
|
@@ -28,6 +28,15 @@ OneGadget::Gadget.add(build_id, 269182,
|
|
28
28
|
OneGadget::Gadget.add(build_id, 799344,
|
29
29
|
constraints: ["[r12] == NULL || r12 == NULL", "[r13] == NULL || r13 == NULL"],
|
30
30
|
effect: "execve(\"/bin/sh\", r12, r13)")
|
31
|
+
OneGadget::Gadget.add(build_id, 799402,
|
32
|
+
constraints: ["writable: rbp-0x38", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
34
|
+
OneGadget::Gadget.add(build_id, 799406,
|
35
|
+
constraints: ["writable: rbp-0x30", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
37
|
+
OneGadget::Gadget.add(build_id, 799414,
|
38
|
+
constraints: ["writable: rbp-0x40", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
31
40
|
OneGadget::Gadget.add(build_id, 921646,
|
32
41
|
constraints: ["[rsp+0x70] == NULL"],
|
33
42
|
effect: "execve(\"/bin/sh\", rsp+0x70, environ)")
|
@@ -28,6 +28,15 @@ OneGadget::Gadget.add(build_id, 294042,
|
|
28
28
|
OneGadget::Gadget.add(build_id, 890627,
|
29
29
|
constraints: ["[r13] == NULL || r13 == NULL", "[rbx] == NULL || rbx == NULL"],
|
30
30
|
effect: "execve(\"/bin/sh\", r13, rbx)")
|
31
|
+
OneGadget::Gadget.add(build_id, 890922,
|
32
|
+
constraints: ["writable: rbp-0x48", "[rbp-0x50] == NULL || rbp-0x50 == NULL", "[rbx] == NULL || rbx == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", rbp-0x50, rbx)")
|
34
|
+
OneGadget::Gadget.add(build_id, 890926,
|
35
|
+
constraints: ["writable: rbp-0x40", "[rbp-0x50] == NULL || rbp-0x50 == NULL", "[rbx] == NULL || rbx == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", rbp-0x50, rbx)")
|
37
|
+
OneGadget::Gadget.add(build_id, 890934,
|
38
|
+
constraints: ["writable: rbp-0x50", "[rbp-0x50] == NULL || rbp-0x50 == NULL", "[rbx] == NULL || rbx == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", rbp-0x50, rbx)")
|
31
40
|
OneGadget::Gadget.add(build_id, 891345,
|
32
41
|
constraints: ["[[rbp-0xa0]] == NULL || [rbp-0xa0] == NULL", "[[rbp-0x70]] == NULL || [rbp-0x70] == NULL"],
|
33
42
|
effect: "execve(\"/bin/sh\", [rbp-0xa0], [rbp-0x70])")
|
@@ -28,6 +28,15 @@ OneGadget::Gadget.add(build_id, 294042,
|
|
28
28
|
OneGadget::Gadget.add(build_id, 890723,
|
29
29
|
constraints: ["[r13] == NULL || r13 == NULL", "[rbx] == NULL || rbx == NULL"],
|
30
30
|
effect: "execve(\"/bin/sh\", r13, rbx)")
|
31
|
+
OneGadget::Gadget.add(build_id, 891018,
|
32
|
+
constraints: ["writable: rbp-0x48", "[rbp-0x50] == NULL || rbp-0x50 == NULL", "[rbx] == NULL || rbx == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", rbp-0x50, rbx)")
|
34
|
+
OneGadget::Gadget.add(build_id, 891022,
|
35
|
+
constraints: ["writable: rbp-0x40", "[rbp-0x50] == NULL || rbp-0x50 == NULL", "[rbx] == NULL || rbx == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", rbp-0x50, rbx)")
|
37
|
+
OneGadget::Gadget.add(build_id, 891030,
|
38
|
+
constraints: ["writable: rbp-0x50", "[rbp-0x50] == NULL || rbp-0x50 == NULL", "[rbx] == NULL || rbx == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", rbp-0x50, rbx)")
|
31
40
|
OneGadget::Gadget.add(build_id, 891441,
|
32
41
|
constraints: ["[[rbp-0xa0]] == NULL || [rbp-0xa0] == NULL", "[[rbp-0x70]] == NULL || [rbp-0x70] == NULL"],
|
33
42
|
effect: "execve(\"/bin/sh\", [rbp-0xa0], [rbp-0x70])")
|
@@ -28,6 +28,15 @@ OneGadget::Gadget.add(build_id, 269182,
|
|
28
28
|
OneGadget::Gadget.add(build_id, 799376,
|
29
29
|
constraints: ["[r12] == NULL || r12 == NULL", "[r13] == NULL || r13 == NULL"],
|
30
30
|
effect: "execve(\"/bin/sh\", r12, r13)")
|
31
|
+
OneGadget::Gadget.add(build_id, 799434,
|
32
|
+
constraints: ["writable: rbp-0x38", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
33
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
34
|
+
OneGadget::Gadget.add(build_id, 799438,
|
35
|
+
constraints: ["writable: rbp-0x30", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
36
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
37
|
+
OneGadget::Gadget.add(build_id, 799446,
|
38
|
+
constraints: ["writable: rbp-0x40", "[rbp-0x40] == NULL || rbp-0x40 == NULL", "[r13] == NULL || r13 == NULL"],
|
39
|
+
effect: "execve(\"/bin/sh\", rbp-0x40, r13)")
|
31
40
|
OneGadget::Gadget.add(build_id, 921694,
|
32
41
|
constraints: ["[rsp+0x70] == NULL"],
|
33
42
|
effect: "execve(\"/bin/sh\", rsp+0x70, environ)")
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'one_gadget/gadget'
|
2
|
+
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6_2.27-3ubuntu1.4_i386/lib/i386-linux-gnu/libc-2.27.so
|
3
|
+
#
|
4
|
+
# Intel 80386
|
5
|
+
#
|
6
|
+
# GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1.4) stable release version 2.27.
|
7
|
+
# Copyright (C) 2018 Free Software Foundation, Inc.
|
8
|
+
# This is free software; see the source for copying conditions.
|
9
|
+
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
10
|
+
# PARTICULAR PURPOSE.
|
11
|
+
# Compiled by GNU CC version 7.5.0.
|
12
|
+
# libc ABIs: UNIQUE IFUNC
|
13
|
+
# For bug reporting instructions, please see:
|
14
|
+
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
|
15
|
+
|
16
|
+
build_id = File.basename(__FILE__, '.rb').split('-').last
|
17
|
+
OneGadget::Gadget.add(build_id, 250291,
|
18
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x34] == NULL"],
|
19
|
+
effect: "execve(\"/bin/sh\", esp+0x34, environ)")
|
20
|
+
OneGadget::Gadget.add(build_id, 250293,
|
21
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x38] == NULL"],
|
22
|
+
effect: "execve(\"/bin/sh\", esp+0x38, environ)")
|
23
|
+
OneGadget::Gadget.add(build_id, 250297,
|
24
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x3c] == NULL"],
|
25
|
+
effect: "execve(\"/bin/sh\", esp+0x3c, environ)")
|
26
|
+
OneGadget::Gadget.add(build_id, 250304,
|
27
|
+
constraints: ["esi is the GOT address of libc", "[esp+0x40] == NULL"],
|
28
|
+
effect: "execve(\"/bin/sh\", esp+0x40, environ)")
|
29
|
+
OneGadget::Gadget.add(build_id, 250339,
|
30
|
+
constraints: ["esi is the GOT address of libc", "[eax] == NULL || eax == NULL", "[[esp]] == NULL || [esp] == NULL"],
|
31
|
+
effect: "execve(\"/bin/sh\", eax, [esp])")
|
32
|
+
OneGadget::Gadget.add(build_id, 250340,
|
33
|
+
constraints: ["esi is the GOT address of libc", "[[esp]] == NULL || [esp] == NULL", "[[esp+0x4]] == NULL || [esp+0x4] == NULL"],
|
34
|
+
effect: "execve(\"/bin/sh\", [esp], [esp+0x4])")
|
35
|
+
OneGadget::Gadget.add(build_id, 424927,
|
36
|
+
constraints: ["esi is the GOT address of libc", "eax == NULL"],
|
37
|
+
effect: "execl(\"/bin/sh\", eax)")
|
38
|
+
OneGadget::Gadget.add(build_id, 424928,
|
39
|
+
constraints: ["esi is the GOT address of libc", "[esp] == NULL"],
|
40
|
+
effect: "execl(\"/bin/sh\", [esp])")
|
41
|
+
OneGadget::Gadget.add(build_id, 1277358,
|
42
|
+
constraints: ["ebx is the GOT address of libc", "eax == NULL"],
|
43
|
+
effect: "execl(\"/bin/sh\", eax)")
|
44
|
+
OneGadget::Gadget.add(build_id, 1277359,
|
45
|
+
constraints: ["ebx is the GOT address of libc", "[esp] == NULL"],
|
46
|
+
effect: "execl(\"/bin/sh\", [esp])")
|
47
|
+
|