Wednesday, May 24, 2017

Starting today warfare, by having total control of Windows OS (i think dll injections having the objectiv of leaving windows.mcs just working as demo..)

Spring Boot as a Windows Service

The documentation provided by Spring on deploying a Spring Boot application as a Windows Service is a little sparse. Indeed, here it is in full:
Spring Boot application can be started as Windows service using winsw.
A sample maintained separately to the core of Spring Boot describes step-by-step how you can create a Windows service for your Spring Boot application.
As the official reference guide is lacking detail, here is a step by step guide to building and deploying a Spring Boot application as a Windows Service.

Why run as a service?

At the heart of Spring Boot’s ethos is the idea that the application is entirely self-contained. The default packaging builds an executable jar that can be run as
The JAR contains an embedded Tomcat server – no external server required. If you have Java installed, you can run Spring Boot. This is fine if you want to run the app interactively from command line but not so good if you want to run it on a production server. In production, you’ll most likely want it to start up automatically when the server starts and automatically restart when it fails. That is, you want to run it as a service. This gives us two options:
  1. Package the application as a ‘traditional’ web application WAR and deploy into an external Tomcat, running as a service.
  2. Create a service directly from the executable JAR.
If you already have an existing web server machine with Tomcat installed, option 1 may be best. If you’re on a newly provisioned Windows (or Linux) server, option 2 is likely easier.
An interesting third option is to run the executable JAR in a Docker container. If Docker is available to you, this could be the best choice. For now though, lets assume that the required target environment is Windows Server and that Docker is not available.

Service Wrapper

To run an executable JAR as a Windows service, it must be wrapped as a Windows exe so that Windows can run it natively. A couple of good  packages exist for this. One is the Tanuki Java Service Wrapper. I’ve used it before and it’s powerful, reliable and easy to configure. This is available under the GPL v2 licence – great for open source projects and acceptable for internal projects. If your product is proprietary / closed-source, you’ll need to pay for a commercial licence.
An alternative is winsw which has a less restrictive licence. This is the wrapper suggested by Spring and the wrapper I’ve chosen. One drawback with winsw is that it requires the .NET framework (currently v2.0).

Running a JAR as a service

You can grab the winsw exe from the project Jenkins repo. Change the name of the exe to match the service you want installed. I renamed mine to from winsw-1.19.1-bin.exe to windows-service-demo-wrapper.exe. Put this in a directory with your Spring boot application jar. You’ll also want to add any application.properties necessary to configure your app.
The only file you need to create is the winsw config XML file. This should be named to match your renamed executable (windows-service-demo-wrapper.xml to match windows-service-demo-wrapper.exe). This tells winsw what to run as a service. Basic configuration looks like this:
    Windows Service Demo
    Demo Spring Boot Windows service
    java
    -jar windows-service-demo.jar
The options set here are:
  • id: Identifier of the service. You may need this to start / stop the service from command line
  • name: Name of the service as shown in the services.msc snap-in
  • description: Description of the service as shown in the services.msc snap-in
  • executable / arguments: The executable and arguments to start the service. This reflects how we’d start it from command line: java -jar windows-service-demo.jar
With that in place, open a cmd window as administrator in this directory and type:
All being well, this will install windows-service-demo as a service as shown in the services.msc snap-in:
services
The service is stopped by default so right click on it to start it.
Verify it’s running by opening a browser and navigating to localhost:8080. Log files are created in the directory with the renamed winsw exe.
The service can be uninstalled just as easily:
winsw offers options to configure behavior of the service and the wrapper which can control logging, service account and service startup type. See the config file reference for details.

Packaging the application

The application distribution package now consists of four files:
  • Spring Boot executable JAR: the application itself
  • application.properties: application configuration (if necessary)
  • windows-service-demo-wrapper.exe: the Windows service wrapper (renamed from the original winsw.exe)
  • windows-service-demo-wrapper.xml: the winsw service wrapper configuration
We can use Maven bundle these as a distribution using the Maven Assembly Plugin. An example of this is at snicoll-scratches on GitHub.
Here’s a somewhat simplified quick and dirty version. I’ve not bothered pulling winsw as a Maven dependency. I’ve just added the exe to my own source control.
The assembly xml looks like this:
    
        zip
    
    
        
        
            ${project.build.directory}
            /
            
                ${project.build.finalName}.jar
            
        
        
        
            ${project.basedir}/src/assembly/resources
            /
        
    
and is invoked from from the maven-assembly-plugin, bound to the package phase:
maven-assembly-plugin
3.0.0
${project.basedir}/src/assembly/service-assembly.xml
service-assembly
package
single
This working example is in my Github.

Tuesday, May 23, 2017

ok...where they hide the code behind the firewall ? on Manifest.cf - so its a tunnel definition code when HTML5 is caching on all Manifest files

Defining Host Checker Pre-Authentication Access Tunnels

If your policies require Host Checker rules or third-party J.E.D.I. DLLs to access a policy server (or other resource) to check compliance before users are authenticated, you can use one of the following methods to make the resource available to the Host Checker Windows clients:
  • Deploy the policy server in a DMZ where Host Checker rules or third-party J.E.D.I. DLLs can access the server directly instead of going through Connect Secure—This deployment is the simplest solution because you do not have to define a Host Checker pre-authentication access tunnel through Connect Secure between clients and the policy server.
  • Deploy the policy server in a protected zone behind Connect Secure (Windows only)—This deployment requires you to define a pre-authentication access tunnel. A pre-authentication access tunnel enables Host Checker rules or third-party J.E.D.I. DLLs to access the protected policy server or resource before the system authenticates users. To define a pre-authentication access tunnel, you associate a loopback address (or hostname) and port on the client with an IP address and port on the policy server. You add one or more tunnel definitions to a MANIFEST.HCIF file, which you then upload to Connect Secure. You can upload multiple MANIFEST.HCIF files to Connect Secure. For all third-party policies enabled on a realm, Host Checker creates tunnels for all of the tunnel definitions in all of the MANIFEST.HCIF files, assuming the definitions are unique.
While running on a Windows client, Host Checker listens for a connection on each loopback address and port you specify in the tunnel definitions. The connections can originate from the integrated Host Checker rules and from client-side or server-side J.E.D.I. DLLs. Host Checker uses the pre-authentication access tunnel(s) to forward the connections through Connect Secure to the policy server(s) or other resource.
Figure 91: Host Checker Creates a Tunnel from a Client to a Policy Server Behind Connect Secure
http://www.juniper.net/techpubs/images/note.gif
NoteHost Checker pre-authentication access tunnels are supported on Windows only.
Related Topics

MD5 THIS



This is the new and improved version of md5 engine.If you put an md5 hash in it will search for it and if found will get the result. This is the beta 0.23 of this engine. You can see the queue of the hashes here. Bots will run thourgh the queue and use various techniques to crack the hashes.


Security question, please solve
J1M         RIG      
L U    7    K K   DU3
BDP   BNF   G K      
  O    4    N A   DBD
7MJ         2AT      

LinuxCBT Debian 7.x - Snort NIDS Sniffer (69/72)

Portugal Spain France Switerzland Energy Outage Blackout 2025 ( Clear a Sabotage, right here in this interconnector subsea cable, its was not a physical cble cut, definetly a CYBER ATTACK)

  https://indianexpress.com/article/business/spain-portugal-power-outage-interconnector-reasons-grid-operators-india-9971636/lite/