Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Dead-simple DNS Server Daemon written in NodeJS
dig -4
and dig -6
) listening on TCP/UDPYou can install dynsdjs
by simply running:
$ npm install -g dynsdjs
$ dynsd # sudo is required to bind port 80 and 53
$ git clone https://github.com/julianxhokaxhiu/dynsdjs.git
$ cd dynsdjs
$ npm install
$ npm link
$ dynsd # sudo is required to bind port 80 and 53
You can configure dynsdjs
through Environment variables
DYNSD_DNSPORT
for the DNS service ( default is 53
)DYNSD_DNSRESOURCES
to define a list of supported resources. Must be a string separated by comma ( default is A,AAAA,NS,CNAME,PTR,NAPTR,TXT,MX,SRV,SOA,TLSA
)The parameter DYNSD_DNSRESOURCES
will help you to either restrict or extend the functionalities of the DNS Server. Either because of security reasons or whatever. This functionality will be a heavy whitelist, when resolving an internal domain present in the list ( injected through the init
event ).
So, if you for eg. set DYNSD_DNSRESOURCES='A,AAAA'
( like in the example down here ), this means that even if the plugins will return an extended entry with other resource records ( like MX, NS, etc. ) your DNS will answer only with A and AAAA records.
$ DYNSD_DNSPORT=5353 DYNSD_DNSRESOURCES='A,AAAA' dynsd
See also package.json as a real world example.
You can extend this Daemon by creating a package that has a name that starts with dynsdjs-plugin
prefix. In order to use it, it's just required to install it globally or in the current working directory, so dynsdjs
will be able to auto-detect it.
$ npm install -g dynsdjs-plugin-api
The plugin at this point will be run automatically on the next restart of the daemon
In order to create a plugin, what you need is just to have a constructor that accepts as first argument the DNS daemon instance. For eg.:
module.export = function ( dns ) {
// `dns` is the daemon instance
}
You can use the daemon instance to listen for events that are emitted from it. At the current state there are three known events. An example would be:
module.export = function ( dns ) {
dns.on( 'init', function ( resolve, reject, data ) {
console.log( 'Hello world!' );
resolve();
})
}
The init
event is emitted as soon as the DNS daemon starts. The event gives tree arguments:
The structure of every entry must be Dictionary where:
A
,AAAA
,etc. )This is an example of valid structure:
{
"A": {
"name": "awesomedomain.local",
"address": "0.0.0.0",
"ttl": 600
},
"AAAA": {
"name": "awesomedomain.local",
"address": "::",
"ttl": 600
}
}
The resolve.internal
event is emitted as soon as the DNS daemon hits an internal entry. The event gives you three arguments. See the next event for more informations.
The resolve.external
event is emitted as soon as the DNS daemon does not hit an internal entry, and goes therefore through external resolvers. The event gives you three arguments:
A current list of plugins that are available can be found here:
See LICENSE
FAQs
Dead-simple DNS Server Daemon written in NodeJS
We found that dynsdjs demonstrated a not healthy version release cadence and project activity because the last version was released 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
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.