SMB

SMB2

SMB3

CIFS

Pure Java SMB Client

jNQ™

jNQ™ brings SMB file sharing to any Java application based on Java 1.5 platform or higher.

You can download the white paper on jNQ™ here.

Built upon the NQE™ technology, jNQ™ is the only Java SMB solution currently available that supports all SMB dialects, up to the latest SMBv3.1.1. jNQ™ Client is a pure-Java library available through its API.

Java developers can now ensure complete file sharing security with end-to-end encryption offered by the SMB 3.1.1 dialect. The security offered by jNQ™ has become essential after the Wannacry and Petya cyber-attacks, which took advantage of the vulnerability of the older SMB dialects. Using SMB 3.1.1 is essential to prevent such malicious attacks by means of message signing, encryption, Active Directory and Kerberos authentications and pre-logon integrity.

In addition to security, jNQ™ also brings the Java community up to date with the latest SMB protocols. Using the new SMB versions has become all the more important today for both developers and their users ever since Microsoft disabled SMBv1 in modern Window versions from September 2017 onwards. The Java community can now connect to any Windows machine simply by using jNQ™

Visuality Systems jNQ Video

jNQ™ Architecture

jNQ™ is available through a comprehensive yet intuitive API:

JNQ ™: A Pure Java SMB Client Architecture

 

jNQ™ functionalities:

  • Compliant with all relevant Microsoft specifications
  • Name resolution functionality by means of NetBIOS, WINS, DNS
  • Security: jNQ™ is a tightly secured system offering:
  • Authentication with LM, NTLM, LMv2, NTLMv2, NTLMSSP, SPNEGO and Kerberos
  • Domain (AD) authentication
  • SMB encryption
  • Message signing
  • Pre-logon integrity
  • File and folder operations: create, open, rename, info, setting exclusive access
  • File operations: read, write, read async, write async
  • Network browsing support
  • DFS
  • RPC support: SAMR, LSA, WINREG, SRVSVC, DSSETUP. All of the above are extendable. A generic DCERPC framework can be used for developing more RPCs
  • Transparent fail-over (support of persistent and durable handles)

 

jNQ™ Markets:

  • SIEM
  • Data Managment
  • Search And Index
  • eDiscovery
  • MFT
  • Information Security
  • Android Applications

jNQ™ highlights:

  • Supports all SMB dialects up to SMB 3.1.1
  • SMB client software library available through its API
  • Written in pure Java, jNQ™ works in any Java environment, starting from 1.5
  • Optimized reads and writes
  • Multi-threaded and highly async

Acquiring the commercial, non-GPL, jNQ™ network stack off-the-shelf allows Visuality Systems customers to save time and money on expensive R&D, get access to the latest SMB dialects and stay focused on their core technology.

jNQ™ Code examples

Mount

PasswordCredentials cr = new PasswordCredentials(
     "userName", "password", "domain");
// Create a new Mount Point
Mount mt = new Mount("IpAddress","ShareName", cr);
// Close all connections and mount points
Client.stop();
 

Open, read, write and delete file

PasswordCredentials cr = new PasswordCredentials(
     "userName", "password", "domain");
Mount mt = new Mount("IpAddress","ShareName", cr);
Params pr = new File.Params(File.ACCESS_WRITE, File.SHARE_FULL,
                                File.DISPOSITION_OPEN, false);
File file = new File(mt, "text.txt", pr);
Buffer buff = new Buffer(DATASIZE);
// read DATASIZE from the begginig of the file.
file.read(buff);
// write the buff from the offset DATASIZE.
file.write(buff);
// mark the file for delete.
file.deleteOnClose();
// close the file.
file.close();
// close the mount point 
 mt.close();
 

Delete file by name

PasswordCredentials cr = new PasswordCredentials(
      "userName", "password", "domain");
Mount mt = new Mount("IpAddress","ShareName", cr);
File.delete(mt, "text.txt");
// close the mount point 
mt.close();
 

Browsing directory

PasswordCredentials cr = new PasswordCredentials(
     "userName", "password", "domain");
Mount mt = new Mount("IpAddress","ShareName", cr);
Directory dir = new Directory(mt, "dir1");
Directory.Entry entry;
System.out.println(DIR + " scan:");
do {
    entry = dir.next();
    if (null != entry)
        System.out.println(entry.name + " : size = " + entry.info.eof);
} while (entry != null);
// close the directory browsing.
dir.close();
// close the mount point 
mt.close();
 

Access via Streaming

PasswordCredentials cr = new PasswordCredentials(
     "userName", "password", "domain");
// Create a new Mount Point
Mount mt = new Mount("IpAddress","ShareName", cr);
// create a new file.
File.Params fileParams = new File.Params(
        File.ACCESS_READ | File.ACCESS_WRITE | 
        File.ACCESS_DELETE, File.SHARE_FULL, 
        File.DISPOSITION_OPEN_IF, false);
File file = new File(mt, "myCreatedFile.txt", fileParams);
// create output stream
OutputStream outputStream = new SmbOutputStream(file);
// create some data to write
int totalAmountOfData = 1024 * 1024 * 10;
byte [] data = createByteBuffer( totalAmountOfData);

// write all the bytes -- buffering is done by TCP networking code
outputStream.write(data);
    
// alternative way of writing all the bytes with a little more control
int amountToWriteEachTime = 1024 * 1024;
int currentPosition = 0;
while (currentPosition < data.length) {
    file.setPosition( currentPosition);
    outputStream.write(data, currentPosition, amountToWriteEachTime);
    currentPosition += amountToWriteEachTime;
}
// close the stream
outputStream.close()
// close the mount point 
mt.close();
 

Follow Us

News

 

   August 12, 2018

Windows XP and Server 2003 users can now seamlessly upgrade from the now-defunct SMB1 stack to the encrypted up to date SMB3 protocol with the latest NQE Server. 

 

  July 31, 2018

Visuality Systems has released jNQ™ 1.0.1 adding security features and performance improvements to the SMB3.1.1 NQ Java library.

 

 January 29, 2018

Visuality Systems will be a sponsor at the SDC EMEA conference to be held in the Dan hotel, Tel-Aviv, Israel on February 27.

See Link

 

 November 01, 2017

Visuality Systems has released jNQ™ 1.00, features the latest SMB 3.1.1 support in Pure JAVA

 

May 15, 2017

The WannaCry Ransomware cyber-attack succeeded due to exploit the vulnerability of non-encrypted SMB versions – SMB1/SMB2. Moving to SMB3.1.1 has become a MUST.

See Link

 

March 27, 2017

The VxWorks version of NQE 2.00 is now released.

 

December 04, 2016

Visuality Systems has released NQE™ 2.00, features the latest SMB 3.1.1 support.