Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
geoipasn
Advanced tools
Readme
GeoIP query tool with AS Number
GeoIP data from geoip-lite using MaxMind's GeoLite2 database
ASN data from APNIC (data-raw-table) (data-used-autnums)
Update GeoLite2 database to better results
cd node_modules/geoip-lite
npm run-script updatedb license_key=[KEY]
You can get free license key in MaxMind
npm i geoipasn
ESM
import geoip from 'geoipasn';
const data = geoip('12.34.56.78');
console.log(data);
CJS
const geoip = require('geoipasn').default;
const data = geoip('12.34.56.78');
console.log(data);
{
ip: '12.34.56.78',
country: { code: 'US', name: 'United States of America' },
region: 'Ohio',
city: 'Dayton',
coordinate: { latitude: 39.6438, longtitude: -84.1743, range: 5 },
timezone: 'America/New_York',
time: 2022-09-24T02:47:59.000Z,
as: { number: 7018, name: 'ATT-INTERNET4' },
service: ''
}
// Get AS number of IP
const data = geoip.asn('12.34.56.78');
console.log(data);
{ ip: '12.34.56.78', number: 7018, name: 'ATT-INTERNET4' }
cd node_modules/geoipasn
npm run query [ip]
Example
npm run query 12.34.56.78
Running geoipasn at 2022-09-24T13:15:21.226Z
query : 12.34.56.78
dns : 8.8.8.8
ip : 93.184.216.34
scan : 1024 ports
open : [80,443]
reset : []
close : [1119,1935]
filtered: 1020 ports
80 open http
443 open https
1119 close bnetgame
1935 close macromedia-fcs
geoip(ip);
target: string [host]:<port|ports>
target ports:
:80
: target port 80
:80,90,100
: target port 80, 90 and 100
:80-100
: target port in range 80 to 100
:22,80-100,443
: target port 22, port in range 80 to 100 and port 443
:@
: target most used 1024 ports
:*
: target all ports (same as :1-65535
)
options: Object
options.protocol: string <tcp|udp>
options.filterBogon: boolean
options.dnsServer: string <server>
ping.tcp(target, options);
ping.udp(host, port, options);
host: string [host]
port: number <port>
options: Object
options.timeout: number <miliseconds>
options.filterBogon: boolean
options.dnsServer: string <server>
ping.scan(host, ports, options);
host: string [host]
ports: Array <ports>
options: Object
options.timeout: number <miliseconds>
options.chunk: number <chunk>
options.protocol: string <tcp|udp>
options.filterBogon: boolean
options.dnsServer: string <server>
FAQs
GeoIP query tool with AS number
We found that geoipasn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.