Binary values can be retrieved from Attributes by using the getObject() function of the entry. The binary Attribute value itself is returned as a byte array. Here is a JavaScript example:
var x = conn.getObject("objectGUID");
for ( i = 0; i < x.length; i++ )
{
task.logmsg ("GUID[" + i + "]: " + x[i]);
}
password = system.arrayToString(conn.getObject("userpassword"));