Zgrab2 - adding new protocols - go

I am trying to add DNS over TLS (DoT) protocol to the zgrab2 tool. I used the zgrab2 documentation but I am not able to figure it out. Has anyone added a new protocol that is not there like port 853? ZGrab2 has the common ports but not post 2015.
From my understanding, you need to write your own code for DNS over TLS (DoT) in golang,
and then run an integration test on it. I understand the latter but have no idea how to create a module for port 853.
Would appreciate any suggestions or useful links anyone has. Thanks!

Related

Im trying to host a SRCDS server behind a CGNAT

I'm trying to host a SRCDS (among other things) for people to join. But after trying to port forward and talking to my ISP it turns out they are using a CGNAT. I am aware of services like NGROK, Hamachi, and other VLAN and VPN type services. But the issue with VLAN is for my server to appear in the browser everybody needs to install hamachi and log into my VLAN. For obvious reasons that are not possible. One note I need to add is I looked at ZeroTier, but I'm not sure how it works or if it works for what I'm trying to do.
Some things I have tried:
ngrok. it doesn't work with srcds since it only forwards TCP and HTTP. srcds need TCP and UDP ports.
I tried looking for VPN services but neither it doesn't work for what I'm trying to do but I could figure it out.
I looked at ZeroTier but haven't tried it yet since I'm not sure it works.
I tried talking to my ISP about port forwarding but once again they are using CGNAT.
Note: paid server hosting is not an option for me due to multiple reasons. One being I need to host multiple things not just SRCDS.
With that being said. How do I make my server public for people to join etc. I have seen it is possible but I can't reproduce them with the same outcome.

Golang `pions` lib example issue

I've just started experimenting with WebRTC with Go and downloaded pions/webrtc library but I'am stuck with it's data-channels example.
As it written in docs I opened jsfiddle client example.
Then I'am running go run main.go command in the /go/src/github.com/pions/webrtc/examples/data-channels folder on my server to launch data-channel.
After that I copy Browser base64 Session Description from jsfiddle example and paste it into my terminal where data-channels go script is running and it generates Golang base64 Session Description code which I paste into jsfiddle example and then press Sart session button.
And it fails to establish connection :(
This is my jsfiddle example for client side:
And this is my server side go script:
What am I doing wrong?
Thanks for using pion-WebRTC (I am one of the developers!)
WebRTC uses a technology called ICE to allow peers to talk to each other. Two peers exchange IP addresses via the SDP (the text you pasted) then they attempt to communicate by sending small UDP packets between each other. Once two IP addresses successfully communicate via ICE the rest of the WebRTC steps can continue. For you this process is failing. I don't know how/why though. Firewalls, VPNs etc... all can cause problems.
You will have to debug and check different scenarios. I would try running the examples on your local PC. If that works then maybe try between a different server. A good tool to help here also is tcpdump that can show if UDP packets are arriving. I usually use tcpdump -i any udp and inbound
We also recently added IPv6 support, so might be worth trying from master and see if that helps at all! Hopefully this helps, but if you are still having issues feel free to ask more questions. We are also all available via our Slack Channel you can sign up here here and would be more then happy to chat!
I met similar problem, and I solved by
echo $BROWSER_SDP | ./main
BROWSER_SDP is the session description in your browser, main is the exe by go build main.go(you can rename exe by mv). This can make sure transfer SDP to the server, which is really important.
The detail

Proxifying an app without hooking connect() or changing hardoded IP

I've been just wondering if there's any method to proxify an app without hooking the connect() function after injecting my dll or changing the hardcoded ip address to which it connects itself.
I need it to connect to changed IP address, and since it doesn't use hostname but an IP address I can't use hosts file to do so.
I need it for a bit more than just sniffing, so using anything like WinPcap isn't an option.
If anybody could point me to something useful, I'd be very grateful. The programming language doesn't really matter to me, but as a note - I'm mostly coding in Delphi.
Thanks in advance, and cheers! :)
Edit:
I'm not looking for any third-party apps, just a method that I could implement in my own app.

Websocket session.Path

I've been playing around with the SuperWebSocket code, pretty cool stuff, but I'm not sure why we really need to set the path at the end of the url as in:
ws = new WebSocket('ws://<%= Request.Url.Host %>:<%= WebSocketPort %>/sample');
I left the 'sample' at the end out from the url and it still works. Why do we need it at all? I didn't see anywhere in the code where it was used except for some logging.
Can someone shed some light on the 'session.Path' thing?
Thanks much,
The path part of the URL is so that you could have different WebSocket server applications running on the same port. In other words, WebSocket connections default to 80 and 443 in order to use existing infrastructure and network configuration. However, you still might want to serve multiple WebSocket applications so that is what the path is for. If you only have a single application running on that port, then you can ignore the path.

win32 C api call for disabling a network adapter?

Ive been all over looking for a way to disable the network adapter through M$ IP Helper routines.
For the majority of the code I've been using this api:
http://msdn.microsoft.com/en-us/library/aa366071(v=VS.85).aspx
However, I do not see a way to actually disable the adapters .. If deleting the IP address associated with the adapter disables the adapter I will accept that, but wasn't sure.
Any help is highly appreciated
Thanks
I don't know if there is a simple API to disable it. I think you might have to go through the device manager API. SetupDiSetDeviceRegistryProperty + SPDRP_CONFIGFLAGS + CONFIGFLAG_DISABLED looks promising.
There are also some suggestions here.

Resources