SMB

SMB2

SMB3

CIFS

Java SMB / SMB2 / SMB3 Client

jNQ™

jNQ™ brings SMB file sharing to any Java application based on Java 1.5 platform or higher.
The jNQ™ client library is the industry’s top priority replacement option for the JCIFS library when SMB2 and SMB3 are required. jNQ™ is the only Java solution that provides full SMB3 support for Android and any Java-based tool.

You can download the white paper on jNQ™ here.

Built upon the YNQ™ 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  8, 2019

Visuality Systems has released YNQ™ 1.1.0 adding the option to disable SMB1 by demand plus adding the WS-Discovery functionality which replaces utilization of the Microsoft SMB1 Browser on the SMB Client product. Additionally MTU support (multi-credits) was added to the SMB server product. 

 

 August  2, 2019

Visuality Systems has released jNQ™ 1.1.0 adding WS-Discovery for enumerating servers functionality which replaces utilization of the Microsoft SMB1 Browser as well as security features and performance improvements to SMB3.1.1

 

May 06, 2019

Visuality Systems has announced the release of the new generation Embedded NQ product - YNQ™. Developed under Agile methodology YNQ™ offers customers a shorter time to market with an upgraded modular design allowing for straight-forward integration to any embedded device.

 

 March 08, 2019

Visuality Systems Visuality Systems announces the release of jNQ™ 1.0.2-br-5.  This version includes a number of new features: internal packet capture including IPv6, DNS and Netbios traffic, an enhanced mount command, and an enhanced directory lookup with pattern matching. In addition, many bugs have been fixed.

 

 November 26, 2018

Visuality Systems announces the transition to the Agile Development System which part of the many advantages include delivery of fully tested Visuality updates in a very short time cycle. Furthermore, Visuality Systems has established an online Help Desk that offers a simple and efficient customer interaction with the Visuality Systems technical support team

Helpdesk Registration

 

 November 06, 2018

Visuality Systems will be a sponsor at the SDC EMEA conference to be held at the Sheraton hotel, Tel-Aviv, Israel on January 30. The event will be co-located with an SMB3 testing Plugfest held on January 28-31.

See Link

 

   August 12, 2018

Windows 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.