├── .gitignore ├── 3aj_lib ├── 3aj_lib.sln └── 3aj_lib │ ├── 3aj_lib.csproj │ ├── Class1.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── SimpleWebServer.cs ├── 3ajlib.png ├── LICENSE ├── README.md ├── chrome.png ├── demo.png ├── origin.png └── testlib1 ├── testlib1.sln └── testlib1 ├── App.config ├── Program.cs ├── Properties └── AssemblyInfo.cs └── testlib1.csproj /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Bb]in/ 27 | [Oo]bj/ 28 | [Ll]og/ 29 | 30 | # Visual Studio 2015/2017 cache/options directory 31 | .vs/ 32 | # Uncomment if you have tasks that create the project's static files in wwwroot 33 | #wwwroot/ 34 | 35 | # Visual Studio 2017 auto generated files 36 | Generated\ Files/ 37 | 38 | # MSTest test Results 39 | [Tt]est[Rr]esult*/ 40 | [Bb]uild[Ll]og.* 41 | 42 | # NUNIT 43 | *.VisualState.xml 44 | TestResult.xml 45 | 46 | # Build Results of an ATL Project 47 | [Dd]ebugPS/ 48 | [Rr]eleasePS/ 49 | dlldata.c 50 | 51 | # Benchmark Results 52 | BenchmarkDotNet.Artifacts/ 53 | 54 | # .NET Core 55 | project.lock.json 56 | project.fragment.lock.json 57 | artifacts/ 58 | 59 | # StyleCop 60 | StyleCopReport.xml 61 | 62 | # Files built by Visual Studio 63 | *_i.c 64 | *_p.c 65 | *_h.h 66 | *.ilk 67 | *.meta 68 | *.obj 69 | *.iobj 70 | *.pch 71 | *.pdb 72 | *.ipdb 73 | *.pgc 74 | *.pgd 75 | *.rsp 76 | *.sbr 77 | *.tlb 78 | *.tli 79 | *.tlh 80 | *.tmp 81 | *.tmp_proj 82 | *_wpftmp.csproj 83 | *.log 84 | *.vspscc 85 | *.vssscc 86 | .builds 87 | *.pidb 88 | *.svclog 89 | *.scc 90 | 91 | # Chutzpah Test files 92 | _Chutzpah* 93 | 94 | # Visual C++ cache files 95 | ipch/ 96 | *.aps 97 | *.ncb 98 | *.opendb 99 | *.opensdf 100 | *.sdf 101 | *.cachefile 102 | *.VC.db 103 | *.VC.VC.opendb 104 | 105 | # Visual Studio profiler 106 | *.psess 107 | *.vsp 108 | *.vspx 109 | *.sap 110 | 111 | # Visual Studio Trace Files 112 | *.e2e 113 | 114 | # TFS 2012 Local Workspace 115 | $tf/ 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper*/ 122 | *.[Rr]e[Ss]harper 123 | *.DotSettings.user 124 | 125 | # JustCode is a .NET coding add-in 126 | .JustCode 127 | 128 | # TeamCity is a build add-in 129 | _TeamCity* 130 | 131 | # DotCover is a Code Coverage Tool 132 | *.dotCover 133 | 134 | # AxoCover is a Code Coverage Tool 135 | .axoCover/* 136 | !.axoCover/settings.json 137 | 138 | # Visual Studio code coverage results 139 | *.coverage 140 | *.coveragexml 141 | 142 | # NCrunch 143 | _NCrunch_* 144 | .*crunch*.local.xml 145 | nCrunchTemp_* 146 | 147 | # MightyMoose 148 | *.mm.* 149 | AutoTest.Net/ 150 | 151 | # Web workbench (sass) 152 | .sass-cache/ 153 | 154 | # Installshield output folder 155 | [Ee]xpress/ 156 | 157 | # DocProject is a documentation generator add-in 158 | DocProject/buildhelp/ 159 | DocProject/Help/*.HxT 160 | DocProject/Help/*.HxC 161 | DocProject/Help/*.hhc 162 | DocProject/Help/*.hhk 163 | DocProject/Help/*.hhp 164 | DocProject/Help/Html2 165 | DocProject/Help/html 166 | 167 | # Click-Once directory 168 | publish/ 169 | 170 | # Publish Web Output 171 | *.[Pp]ublish.xml 172 | *.azurePubxml 173 | # Note: Comment the next line if you want to checkin your web deploy settings, 174 | # but database connection strings (with potential passwords) will be unencrypted 175 | *.pubxml 176 | *.publishproj 177 | 178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 179 | # checkin your Azure Web App publish settings, but sensitive information contained 180 | # in these scripts will be unencrypted 181 | PublishScripts/ 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/[Pp]ackages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/[Pp]ackages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/[Pp]ackages/repositories.config 191 | # NuGet v3's project.json files produces more ignorable files 192 | *.nuget.props 193 | *.nuget.targets 194 | 195 | # Microsoft Azure Build Output 196 | csx/ 197 | *.build.csdef 198 | 199 | # Microsoft Azure Emulator 200 | ecf/ 201 | rcf/ 202 | 203 | # Windows Store app package directories and files 204 | AppPackages/ 205 | BundleArtifacts/ 206 | Package.StoreAssociation.xml 207 | _pkginfo.txt 208 | *.appx 209 | 210 | # Visual Studio cache files 211 | # files ending in .cache can be ignored 212 | *.[Cc]ache 213 | # but keep track of directories ending in .cache 214 | !?*.[Cc]ache/ 215 | 216 | # Others 217 | ClientBin/ 218 | ~$* 219 | *~ 220 | *.dbmdl 221 | *.dbproj.schemaview 222 | *.jfm 223 | *.pfx 224 | *.publishsettings 225 | orleans.codegen.cs 226 | 227 | # Including strong name files can present a security risk 228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 229 | #*.snk 230 | 231 | # Since there are multiple workflows, uncomment next line to ignore bower_components 232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 233 | #bower_components/ 234 | # ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true 235 | **/wwwroot/lib/ 236 | 237 | # RIA/Silverlight projects 238 | Generated_Code/ 239 | 240 | # Backup & report files from converting an old project file 241 | # to a newer Visual Studio version. Backup files are not needed, 242 | # because we have git ;-) 243 | _UpgradeReport_Files/ 244 | Backup*/ 245 | UpgradeLog*.XML 246 | UpgradeLog*.htm 247 | ServiceFabricBackup/ 248 | *.rptproj.bak 249 | 250 | # SQL Server files 251 | *.mdf 252 | *.ldf 253 | *.ndf 254 | 255 | # Business Intelligence projects 256 | *.rdl.data 257 | *.bim.layout 258 | *.bim_*.settings 259 | *.rptproj.rsuser 260 | *- Backup*.rdl 261 | 262 | # Microsoft Fakes 263 | FakesAssemblies/ 264 | 265 | # GhostDoc plugin setting file 266 | *.GhostDoc.xml 267 | 268 | # Node.js Tools for Visual Studio 269 | .ntvs_analysis.dat 270 | node_modules/ 271 | 272 | # Visual Studio 6 build log 273 | *.plg 274 | 275 | # Visual Studio 6 workspace options file 276 | *.opt 277 | 278 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 279 | *.vbw 280 | 281 | # Visual Studio LightSwitch build output 282 | **/*.HTMLClient/GeneratedArtifacts 283 | **/*.DesktopClient/GeneratedArtifacts 284 | **/*.DesktopClient/ModelManifest.xml 285 | **/*.Server/GeneratedArtifacts 286 | **/*.Server/ModelManifest.xml 287 | _Pvt_Extensions 288 | 289 | # Paket dependency manager 290 | .paket/paket.exe 291 | paket-files/ 292 | 293 | # FAKE - F# Make 294 | .fake/ 295 | 296 | # JetBrains Rider 297 | .idea/ 298 | *.sln.iml 299 | 300 | # CodeRush personal settings 301 | .cr/personal 302 | 303 | # Python Tools for Visual Studio (PTVS) 304 | __pycache__/ 305 | *.pyc 306 | 307 | # Cake - Uncomment if you are using it 308 | # tools/** 309 | # !tools/packages.config 310 | 311 | # Tabs Studio 312 | *.tss 313 | 314 | # Telerik's JustMock configuration file 315 | *.jmconfig 316 | 317 | # BizTalk build output 318 | *.btp.cs 319 | *.btm.cs 320 | *.odx.cs 321 | *.xsd.cs 322 | 323 | # OpenCover UI analysis results 324 | OpenCover/ 325 | 326 | # Azure Stream Analytics local run output 327 | ASALocalRun/ 328 | 329 | # MSBuild Binary and Structured Log 330 | *.binlog 331 | 332 | # NVidia Nsight GPU debugger configuration file 333 | *.nvuser 334 | 335 | # MFractors (Xamarin productivity tool) working folder 336 | .mfractor/ 337 | 338 | # Local History for Visual Studio 339 | .localhistory/ 340 | 341 | # BeatPulse healthcheck temp database 342 | healthchecksdb -------------------------------------------------------------------------------- /3aj_lib/3aj_lib.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2019 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3aj_lib", "3aj_lib\3aj_lib.csproj", "{1A3F29FB-E41D-4B64-A4D4-BFFB898937E5}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {1A3F29FB-E41D-4B64-A4D4-BFFB898937E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {1A3F29FB-E41D-4B64-A4D4-BFFB898937E5}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {1A3F29FB-E41D-4B64-A4D4-BFFB898937E5}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {1A3F29FB-E41D-4B64-A4D4-BFFB898937E5}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {D3E5FF97-3FDE-4390-A7F8-0C96D1E2FF33} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /3aj_lib/3aj_lib/3aj_lib.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1A3F29FB-E41D-4B64-A4D4-BFFB898937E5} 8 | Library 9 | Properties 10 | _3aj_lib 11 | 3aj_lib 12 | v4.6.1 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /3aj_lib/3aj_lib/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | 10 | namespace _3aj_lib 11 | { 12 | public class _3aj 13 | { 14 | public static string shimServer = "http://localhost:8666/3aj/"; 15 | public static Queue> queries = new Queue>(); 16 | public static List queryDone = new List(); 17 | public static Dictionary> responses = new Dictionary>(); 18 | public static WebServer ws; 19 | 20 | public static string SendResponse(HttpListenerRequest request) 21 | { 22 | if (request.Url.PathAndQuery.Contains("token=")) 23 | { 24 | var getParams = request.QueryString; 25 | string token = getParams["token"]; 26 | string txt = getParams["txt"]; 27 | int pos = int.Parse(getParams["pos"]); 28 | if (responses.ContainsKey(token)) 29 | { 30 | responses[token][pos] = txt; 31 | } 32 | return ""; 33 | } 34 | else if (request.Url.PathAndQuery.Contains("done=")) 35 | { 36 | var getParams = request.QueryString; 37 | string token = getParams["done"]; 38 | queryDone.Add(token); 39 | return ""; 40 | } 41 | else if (request.Url.PathAndQuery.Contains(".json")) 42 | { 43 | if (queries.Count > 0) 44 | { 45 | var lookup = queries.Dequeue(); 46 | string json = "{\"token\":\"" + lookup["token"] + "\",\"url\":\"" + lookup["url"] + "\"}"; 47 | responses[lookup["token"]] = new Dictionary(); 48 | return json; 49 | } 50 | else 51 | { 52 | return "{\"token\":\"nop\",\"url\":\"\"}"; 53 | } 54 | } 55 | else 56 | { 57 | string response = ""; 58 | return response; 59 | } 60 | } 61 | public static Dictionary _3ajclient(string url) 62 | { 63 | Dictionary lookup = new Dictionary(); 64 | lookup["token"] = Guid.NewGuid().ToString(); 65 | lookup["url"] = url; 66 | 67 | Console.WriteLine("[Request] {0}", url); 68 | 69 | queries.Enqueue(lookup); 70 | 71 | int timeout = 5000; 72 | while (!queryDone.Contains(lookup["token"]) && (timeout > 0)) 73 | { 74 | int sleepTime = 100; 75 | System.Threading.Thread.Sleep(sleepTime); 76 | timeout -= sleepTime; 77 | } 78 | 79 | var result = new Dictionary(); 80 | if (responses.ContainsKey(lookup["token"])) 81 | { 82 | result = responses[lookup["token"]]; 83 | } 84 | return result; 85 | } 86 | 87 | public static void _3ajinit() 88 | { 89 | ws = new WebServer(SendResponse, shimServer); 90 | ws.Run(); 91 | Process p = Process.Start("IExplore.exe", shimServer); 92 | //Process p = Process.Start("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", shimServer); 93 | System.Threading.Thread.Sleep(2000); 94 | } 95 | 96 | public static void _3ajclose() 97 | { 98 | ws.Stop(); 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /3aj_lib/3aj_lib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("3aj_lib")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("3aj_lib")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1a3f29fb-e41d-4b64-a4d4-bffb898937e5")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /3aj_lib/3aj_lib/SimpleWebServer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | using System.Threading; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace _3aj_lib 8 | { 9 | // Credit: https://codehosting.net/blog/BlogEngine/post/Simple-C-Web-Server 10 | public class WebServer 11 | { 12 | private readonly HttpListener _listener = new HttpListener(); 13 | private readonly Func _responderMethod; 14 | 15 | public WebServer(string[] prefixes, Func method) 16 | { 17 | if (!HttpListener.IsSupported) 18 | throw new NotSupportedException( 19 | "Needs Windows XP SP2, Server 2003 or later."); 20 | 21 | // URI prefixes are required, for example 22 | // "http://localhost:8080/index/". 23 | if (prefixes == null || prefixes.Length == 0) 24 | throw new ArgumentException("prefixes"); 25 | 26 | // A responder method is required 27 | if (method == null) 28 | throw new ArgumentException("method"); 29 | 30 | foreach (string s in prefixes) 31 | _listener.Prefixes.Add(s); 32 | 33 | _responderMethod = method; 34 | _listener.Start(); 35 | } 36 | 37 | public WebServer(Func method, params string[] prefixes) 38 | : this(prefixes, method) { } 39 | 40 | public void Run() 41 | { 42 | ThreadPool.QueueUserWorkItem((o) => 43 | { 44 | Console.WriteLine("Webserver running..."); 45 | try 46 | { 47 | while (_listener.IsListening) 48 | { 49 | ThreadPool.QueueUserWorkItem((c) => 50 | { 51 | var ctx = c as HttpListenerContext; 52 | try 53 | { 54 | string rstr = _responderMethod(ctx.Request); 55 | byte[] buf = Encoding.UTF8.GetBytes(rstr); 56 | ctx.Response.ContentLength64 = buf.Length; 57 | ctx.Response.OutputStream.Write(buf, 0, buf.Length); 58 | } 59 | catch { } // suppress any exceptions 60 | finally 61 | { 62 | // always close the stream 63 | ctx.Response.OutputStream.Close(); 64 | } 65 | }, _listener.GetContext()); 66 | } 67 | } 68 | catch { } // suppress any exceptions 69 | }); 70 | } 71 | 72 | public void Stop() 73 | { 74 | _listener.Stop(); 75 | _listener.Close(); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /3ajlib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtmsecurity/3aj-lib/398c5b8a5f0bf2366077853cd14f0a7b7e281443/3ajlib.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 @dtmsecurity 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. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 3ajlib 2 | 3 | A proof of concept that demonstrates a method of sending/receiving data from .NET via a legitimate browser process of your choosing. 4 | 5 | ## Introduction 6 | 7 | There are situations where a red teamer may want to have more control over the specific origin of their traffic on a system. Defensive tools such as [JA3](https://github.com/salesforce/ja3) and other EDR product components can identify known bad and contribute to building up a risk score based on the aspects of the web client being used to send data. I played around with JA3 and looked at the results for some of the typical web clients that are used. On the whole there was nothing too alarming, since lots of legitimate software uses the same methods. That said a JA3 hash of a client can contribute to a wider mechanism/set of metrics for filtering/determing a risk score for connections. Equally EDR products may look at the process responsible for sending traffic. I set out thinking of a way I can control which client sends data and where better to start than a legitimate web browser or in fact any of them. 8 | 9 | ## Idea 10 | 11 | I can set up a sort of local IPC over HTTP between .NET and a web browser. I can then use JavaScript to handle a) communications outbound b) communications to my software. 12 | 13 | In an attack scenario this would look something like this: 14 | ![Diagram](3ajlib.png) 15 | 16 | ## What does this proof of concept do? 17 | 18 | This proof of concept introduces a library which sets up this channel. It's tailored towards my work on [DoHC2](https://github.com/SpiderLabs/DoHC2) and currently the test client does DNS resolution via Google's DNS over HTTPS endpoint. In reality this concept can be extended to talk to any endpoint which presents a 'Access-Control-Allow-Origin' header which permits the localhost endpoint used. At the moment use of the library has a limitation of expecting JSON in the specific example used, however this could trivially be changed to make something more arbitrary, liklely within the JavaScript. 19 | 20 | ## Demo 21 | 22 | Demo showing DNS over HTTPS resolution via Internet Explorer: 23 | 24 | ![IE](demo.png) 25 | 26 | Demo showing DNS over HTTPS resolution via Chrome: 27 | 28 | ![Chrome](chrome.png) 29 | 30 | ## Authors 31 | 32 | * **David Middlehurst** - Twitter- [@dtmsecurity](https://twitter.com/dtmsecurity) 33 | 34 | ## License 35 | 36 | MIT 37 | 38 | ## Acknowledgments 39 | 40 | * [Simple C# Web Server](https://codehosting.net/blog/BlogEngine/post/Simple-C-Web-Server) 41 | -------------------------------------------------------------------------------- /chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtmsecurity/3aj-lib/398c5b8a5f0bf2366077853cd14f0a7b7e281443/chrome.png -------------------------------------------------------------------------------- /demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtmsecurity/3aj-lib/398c5b8a5f0bf2366077853cd14f0a7b7e281443/demo.png -------------------------------------------------------------------------------- /origin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtmsecurity/3aj-lib/398c5b8a5f0bf2366077853cd14f0a7b7e281443/origin.png -------------------------------------------------------------------------------- /testlib1/testlib1.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2019 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testlib1", "testlib1\testlib1.csproj", "{D7B25943-A17A-4E61-B7AC-DAB59322CF1D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D7B25943-A17A-4E61-B7AC-DAB59322CF1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D7B25943-A17A-4E61-B7AC-DAB59322CF1D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D7B25943-A17A-4E61-B7AC-DAB59322CF1D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D7B25943-A17A-4E61-B7AC-DAB59322CF1D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {54DC7641-F687-4F8C-B086-0C45E5489DA9} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /testlib1/testlib1/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /testlib1/testlib1/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using _3aj_lib; 7 | 8 | namespace testlib1 9 | { 10 | class Program 11 | { 12 | static void Main(string[] args) 13 | { 14 | _3aj._3ajinit(); 15 | 16 | Console.WriteLine("Enter domain:"); 17 | string domain = Console.ReadLine(); 18 | Console.WriteLine("Record Type [Default: A]:"); 19 | string type = Console.ReadLine(); 20 | if (type == "") 21 | { 22 | type = "A"; 23 | } 24 | var result = _3aj._3ajclient(String.Format("https://dns.google.com/resolve?name={0}&type={1}", domain, type)); 25 | foreach (KeyValuePair entry in result) 26 | { 27 | Console.WriteLine("[{0}] {1}", entry.Key, entry.Value); 28 | } 29 | 30 | Console.Read(); 31 | 32 | _3aj._3ajclose(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /testlib1/testlib1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("testlib1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("testlib1")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("d7b25943-a17a-4e61-b7ac-dab59322cf1d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /testlib1/testlib1/testlib1.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {D7B25943-A17A-4E61-B7AC-DAB59322CF1D} 8 | Exe 9 | testlib1 10 | testlib1 11 | v4.6.1 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | ..\..\3aj_lib\3aj_lib\bin\Debug\3aj_lib.dll 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | --------------------------------------------------------------------------------