SNMPGET works from program but not from CLI - snmp

I am working on an fax grabber, for a fax in our building only Samsung provides the software "Samsung Easy Printer Manager" the program sends an SNMPGET to the Printer as I saw in Wireshark
Frame 133: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on interface bridge102, id 5
Ethernet II, Src: Parallel_53:1e:29 (Mac), Dst: SamsungE_69:6f:fe (Mac)
Internet Protocol Version 4, Src: 192.168.178.125, Dst: 192.168.178.38
User Datagram Protocol, Src Port: 55160, Dst Port: 161
Simple Network Management Protocol
version: version-1 (0)
community: Test
data: get-request (0)
get-request
request-id: 10944
error-status: noError (0)
error-index: 0
variable-bindings: 1 item
1.3.6.1.4.1.236.11.5.11.81.12.16.1.2.1: Value (Null)
Object Name: 1.3.6.1.4.1.236.11.5.11.81.12.16.1.2.1 (iso.3.6.1.4.1.236.11.5.11.81.12.16.1.2.1)
Value (Null)
[Response To: 134]
[Time: 0.000019000 seconds]
Answer:
Frame 135: 93 bytes on wire (744 bits), 93 bytes captured (744 bits) on interface vmenet2, id 2
Ethernet II, Src: SamsungE_69:6f:fe (Mac), Dst: Parallel_53:1e:29 (Mac)
Internet Protocol Version 4, Src: 192.168.178.38, Dst: 192.168.178.125
User Datagram Protocol, Src Port: 161, Dst Port: 55160
Simple Network Management Protocol
version: version-1 (0)
community: Test
data: get-response (2)
get-response
request-id: 10944
error-status: noError (0)
error-index: 0
variable-bindings: 1 item
1.3.6.1.4.1.236.11.5.11.81.12.16.1.2.1: 01000000
Object Name: 1.3.6.1.4.1.236.11.5.11.81.12.16.1.2.1 (iso.3.6.1.4.1.236.11.5.11.81.12.16.1.2.1)
Value (OctetString): 01000000
[Response To: 134]
[Time: 0.012747000 seconds]
But if im sending the get Request from my Laptop I get:
SNMPv2-SMI::enterprises.236.11.5.11.81.12.16.1.2.1 = No Such Instance currently exists at this OID
and after i googled the OID there was no result.
Any Ideas

Related

Unable to Send ISO 8583 Messages Through JMeter

I am using ISO8583 Sampler in JMeter for Sending ISO Messages, i had put Necessary Plugins & JAR files like JPOS. However i get "MTI not available" in the Sampler Response
Settings in ISO8583 Connection Configuration
Packager Configuration :- test-generic-validating-packager.xml file from JPOS 2.1.4
Host Name :- 192.168.1.104
Port Number :- 8080
Field wise Data in ISO8583 Sampler
003 380000
011 00000000XXXX
012 20200821${__time(HHmmss,)}
017 20200821
024 200
032 0
034 000000
041 0000000000000MBK
049 INR
102 IBKL 01310200000XXXX
123 MBK
Output of Sampler
Thread Name: Thread Group 1-1
Sample Start: 2020-08-21 17:18:09 IST
Load time: 0
Connect Time: 0
Latency: 0
Size in bytes: 0
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code:
Response message: org.jpos.iso.ISOException: MTI not available
When i put MTI as 1200 or 0800 in the ISO Sampler, JMeter is unable to send the Request to the Server
Can someone help me out in this??
The same i able to process with Neoload Tool..
As per this documentation aren’t you missing the configuration of field 0 for MTI:
https://github.com/tilln/jmeter-iso8583#iso8583-sampler

Use 'dd' to split the binary apart and extract the parts

I have firmware file in .bin format, but need to obtain the romimage.img and Kernel uImage files required to reflash a bricked device.
I used Binwalk to identify different parts of a firmware binary, $ binwalk firmware.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
392 0x188 uImage header, header size: 64 bytes, header CRC: 0xEF73A583, created: 1969-12-31 23:59:59, image size: 1572736 bytes, Data Address: 0x20008000, Entry Point: 0x20008000, data CRC: 0x3661C6EC, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: none, image name: "SP2Xcybertan_rom_bin"
13596 0x351C gzip compressed data, maximum compression, from Unix, last modified: 2019-04-03 05:25:36
1573192 0x180148 uImage header, header size: 64 bytes, header CRC: 0x9053B22D, created: 1969-12-31 23:59:59, image size: 8474624 bytes, Data Address: 0x0, Entry Point: 0x0, data CRC: 0xFC8655E0, OS: Linux, CPU: ARM, image type: Filesystem Image, compression type: none, image name: "SP2Xcybertan_rom_bin"
1573256 0x180188 Squashfs filesystem, little endian, non-standard signature, version 3.1, size: 8473072 bytes, 1028 inodes, blocksize: 131072 bytes, created: 2019-04-03 05:36:06
from boot log:
Loading from NAND 32MiB 3,3V 8-bit, offset 0x80000
Image Name: SP2Xcybertan_rom_bin
Created: 1970-01-01 0:00:-1 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1572736 Bytes = 1.5 MB
Load Address: 20008000
Entry Point: 20008000
... ... ... ...
Creating 11 MTD partitions on "gen_nand":
0x00000000-0x00060000 : "u-boot"
0x00060000-0x00080000 : "u-bootenv"
0x00080000-0x01460000 : "ROMIMAGE"
0x01460000-0x01b60000 : "HALFIMAGE"
0x00200000-0x01460000 : "LINUX_ROOTFS"
... ... ... ...
Now I need to split the firmware image apart and extract the Rom Image romimage.img and kernel uImage from firmware.bin: how to make this properly use linux dd command?

Eclispe Milo handle missing Sever Nonce in ActivateSessionRequest

I use Eclipse Milo (0.2.3) in my prject for OPC UA communication. The OPC UA participants are a client (written using Eclipse Milo) and a server, which is running on a remote machine, and is not implemented using Milo).
I can connect the client to the server normally and if the remote server is shut down, I am able to reconnect the client automatically, as soon as the server is accessible again.
However, after updating the server software, the client can't reconnect any more and it floods the server with the following messages:
Create Session Request
The server is able to create a session
Activate Session Request
The server sends an Activate Session Response, in which the ServerNonce is missing and the service result is "bad"
This causes the client to send a new Create Session Request. This all happens multiple times within a second, which makes it impossible for the server to execute any other tasks then trying to create this session.
Are there any settings in Milo to specify the reconnection delay? Or is there any setting for sepcifying what should happen when receiving an empty ServerNonce?
The server's responses are as follows:
If the session can be activated:
OpcUa Binary Protocol
Message Type: MSG
Chunk Type: F
Message Size: 96
SecureChannelId: 1599759116
Security Token Id: 1
Security Sequence Number: 53
Security RequestId: 3
OpcUa Service : Encodeable Object
TypeId : ExpandedNodeId
NodeId EncodingMask: Four byte encoded Numeric (0x01)
NodeId Namespace Index: 0
NodeId Identifier Numeric: ActivateSessionResponse (470)
ActivateSessionResponse
ResponseHeader: ResponseHeader
Timestamp: Nov 16, 2018 14:05:47.974000000
RequestHandle: 1
ServiceResult: 0x00000000 [Good]
ServiceDiagnostics: DiagnosticInfo
EncodingMask: 0x00
.... ...0 = has symbolic id: False
.... ..0. = has namespace: False
.... .0.. = has localizedtext: False
.... 0... = has locale: False
...0 .... = has additional info: False
..0. .... = has inner statuscode: False
.0.. .... = has inner diagnostic info: False
StringTable: Array of String
ArraySize: 0
AdditionalHeader: ExtensionObject
TypeId: ExpandedNodeId
EncodingMask: 0x00
ServerNonce: ab...
Results: Array of StatusCode
ArraySize: 0
DiagnosticInfos: Array of DiagnosticInfo
ArraySize: 0
If the session can't be activated (after updating the server's software):
OpcUa Binary Protocol
Message Type: MSG
Chunk Type: F
Message Size: 64
SecureChannelId: 1599759041
Security Token Id: 1
Security Sequence Number: 61
Security RequestId: 11
OpcUa Service : Encodeable Object
TypeId : ExpandedNodeId
ActivateSessionResponse
ResponseHeader: ResponseHeader
Timestamp: Nov 16, 2018 12:49:08.235000000
RequestHandle: 222
ServiceResult: 0x80000000 [Bad]
ServiceDiagnostics: DiagnosticInfo
EncodingMask: 0x00
.... ...0 = has symbolic id: False
.... ..0. = has namespace: False
.... .0.. = has localizedtext: False
.... 0... = has locale: False
...0 .... = has additional info: False
..0. .... = has inner statuscode: False
.0.. .... = has inner diagnostic info: False
StringTable: Array of String
ArraySize: 0
AdditionalHeader: ExtensionObject
TypeId: ExpandedNodeId
EncodingMask: 0x00
ServerNonce: <MISSING>[OpcUa Null ByteString]
Results: Array of StatusCode
ArraySize: 0
DiagnosticInfos: Array of DiagnosticInfo
ArraySize: 0
Thank you in advance for your help.
This corner case you described where there's no delay between a failed re-activation and the subsequent re-creation is addressed on the dev/0.3 branch in this commit.
I might be able to back port it to 0.2.x next week if I have some spare time.
I don't think there are any workarounds you can use.

WebRTC live stream(H264) error in Firefox, can't generate valid SDP answer

I am trying to run H264 encoded live stream in Web Browser using Janus WebRTC Gateway. While testing with Chrome, the stream works fine but with firefox it shows ICE failed, add a TURN server and see about:webrtc for more details.
Following is my about:webrtc logs for firefox.
[ 6442450983 ] http://192.168.2.194:5000/ 15:18:19 GMT+0530 (IST)
PeerConnection ID: 1515491295667117 (id=6442450983 url=http://192.168.2.194:5000/)
ICE Stats
Local Candidate Remote Candidate ICE State Priority Nominated Selected Bytes sent Bytes received
ICE restarts:
ICE rollbacks:
SDP
Local SDP
v=0
o=mozilla...THIS_IS_SDPARTA-57.0.4 3500649212029345392 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 11:44:F1:BD:D1:69:8E:17:E0:9A:AA:89:8E:76:9F:4E:09:E1:94:D0:37:34:EE:FE:DF:5E:FC:77:B0:4D:F7:53
a=ice-options:trickle
a=msid-semantic:WMS *
m=video 0 RTP/SAVPF 120
c=IN IP4 0.0.0.0
a=inactive
a=end-of-candidates
a=mid:video
a=rtpmap:120 VP8/90000
Remote SDP
v=0
o=- 1515491295396595 1515491295396595 IN IP4 106.51.68.195
s=-
t=0 0
a=sendrecv
a=group:BUNDLE video
a=msid-semantic:WMS janus
m=video 9 RTP/SAVPF 126
c=IN IP4 106.51.68.195
a=candidate:1 1 udp 2013266431 192.168.2.194 45887 typ host
a=candidate:2 1 udp 1677722111 106.51.68.195 45887 typ srflx raddr 192.168.2.194 rport 45887
a=sendonly
a=end-of-candidates
a=fingerprint:sha-256 D2:B9:31:8F:DF:24:D8:0E:ED:D2:EF:25:9E:AF:6F:B8:34:AE:53:9C:E6:F3:8F:F2:64:15:FA:E8:7F:53:2D:38
a=ice-options:trickle
a=ice-pwd:KsS99rsAZXj9lFd7psCT61
a=ice-ufrag:3tcw
a=mid:video
a=rtcp-fb:126 nack
a=rtcp-fb:126 goog-remb
a=rtcp-mux
a=rtpmap:126 H264/90000
a=setup:actpass
a=ssrc:3973486276 cname:janusvideo
a=ssrc:3973486276 msid:janus janusv0
a=ssrc:3973486276 mslabel:janus
a=ssrc:3973486276 label:janusv0
RTP Stats
I even tried adding following TURN Server
{urls: "turn:numb.viagenie.ca",
username: "l1787875#mvrht.com",
credential: "test"}
But the console error changes to ICE failed, your TURN server appears to be broken, see about:webrtc for more details, Keeping the about:webrtc logs same as before.
I figured out that somehow Firefox can't generate a valid answer for SDP offer generated by Janus. Created answer by Firefox has attribute rtpmap: 120 VP8/90000, whereas SDP offer made by Janus has attribute rtpmap: 127 H264/90000, which prevent Firefox to establish a SDP session with Janus. Chrome can generate the valid answer with rtpmap: 127 H264/90000 so it can display the stream perfectly.
I am using Mozilla firefox-57.0.4.
Is there a way, I can get/ generate a valid SDP answer for incoming SDP offer from Janus?
This solution worked for me (last yellow message):
https://groups.google.com/forum/#!topic/meetecho-janus/jKg5u9421kM
I'm using Janus and I was getting the same error in Firefox.
The problem was about the SDP profile-level-id.
I just had to replace it:
// Create offer/answer now
if(jsep === null || jsep === undefined) {
createOffer(handleId, media, callbacks);
} else {
if(adapter.browserDetails.browser === "edge") {
// This is Edge, add an a=end-of-candidates at the end
jsep.sdp += "a=end-of-candidates\r\n";
}
var oldsdp = jsep["sdp"];
var pattern=/420029/gi;
var newsdp = oldsdp.replace(pattern,"42e01f");
Janus.log(newsdp);
jsep["sdp"]=newsdp;
config.pc.setRemoteDescription(
new RTCSessionDescription(jsep),
function() {
Janus.log("Remote description accepted!");
createAnswer(handleId, media, callbacks);
}, callbacks.error);
}
}

Asterisk: PJSIP_HEADER and Websocket

I need to add custom header when calling the client's webrtc. Used by asterisk 13 + siphtml5.
Dialplan:
exten => 198,1,Answer()
same => n,Set(PJSIP_HEADER(add,X-DRP)=71234567890)
same => n,DIAL(PJSIP/${EXTEN})
Asterisk log:
Connected to Asterisk 13.17.2 currently running on ubuntu-xenial (pid = 8895)
== WebSocket connection from '192.168.0.44:58096' forcefully closed due to fatal write error
== WebSocket connection from '192.168.0.44:58595' for protocol 'sip' accepted using version '13'
-- Added contact 'sip:a9gn89sg#192.168.0.44:58595;transport=ws' to AOR '199' with expiration of 450 seconds
== Contact 199/sip:a9gn89sg#192.168.0.44:58595;transport=ws has been created
== Contact 199/sip:3qogi2fo#192.168.0.44:58096;transport=ws has been deleted
-- Contact 199/sip:a9gn89sg#192.168.0.44:58595;transport=ws is now Unknown. RTT: 0.000 msec
== Setting global variable 'SIPDOMAIN' to 'aster13'
== DTLS ECDH initialized (automatic), faster PFS enabled
-- Executing [198#default:1] Answer("PJSIP/199-00000008", "") in new stack
> 0x7f0ea0071960 -- Strict RTP learning after remote address set to: 123.135.239.111:58827
[Oct 23 16:02:31] ERROR[8943]: pjproject:0 <?>: icess0x7f0ea000ce18 ..Error sending STUN request: Network is unreachable
[Oct 23 16:02:31] ERROR[8943]: pjproject:0 <?>: icess0x7f0ea000ce18 ..Error sending STUN request: Network is unreachable
> 0x7f0ea0071960 -- Strict RTP learning after ICE completion
> 0x7f0ea0071960 -- Strict RTP switching to RTP target address 192.168.100.97:58827 as source
-- Executing [198#default:2] SIPAddHeader("PJSIP/199-00000008", "X-DRP: 79161234567") in new stack
-- Executing [198#default:3] Set("PJSIP/199-00000008", "PJSIP_HEADER(add,X-DRP)=79161234567") in new stack
-- Executing [198#default:4] Verbose("PJSIP/199-00000008", "Set(OldContact="199" <sips:199#192.168.100.97:54514;transport=ws;rtcweb-breaker=no;click2call=no>;+g.oma.sip-im;language="en,fr")") in new stack
Set(OldContact=199 <sips:199#192.168.100.97:54514;transport=ws;rtcweb-breaker=no;click2call=no>;+g.oma.sip-im;language=en,fr)
-- Executing [198#default:5] Dial("PJSIP/199-00000008", "PJSIP/198") in new stack
-- Called PJSIP/198
-- PJSIP/199-00000008 requested media update control 26, passing it to PJSIP/198-00000009
== DTLS ECDH initialized (automatic), faster PFS enabled
-- PJSIP/198-00000009 is ringing
> 0x7f0ea0071960 -- Strict RTP learning complete - Locking on source address 192.168.100.97:58827
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [198#default:7] Hangup("PJSIP/199-00000008", "") in new stack
== Spawn extension (default, 198, 7) exited non-zero on 'PJSIP/199-00000008'
-- Added contact 'sips:199#192.168.100.97:54514;transport=ws;rtcweb-breaker=no' to AOR '199' with expiration of 200 seconds
== Contact 199/sips:199#192.168.100.97:54514;transport=ws;rtcweb-breaker=no has been created
== Contact 199/sip:a9gn89sg#192.168.0.44:58595;transport=ws has been deleted
-- Contact 199/sips:199#192.168.100.97:54514;transport=ws;rtcweb-breaker=no is now Unknown. RTT: 0.000 msec
And I can't find header X-DRP in debug log of my browser:
recv=INVITE sips:198#192.168.100.97:54445;transport=ws;rtcweb-breaker=no SIP/2.0
Via: SIP/2.0/WSS 192.168.100.97:54445;rport;branch=z9hG4bKPja4ca4b5b-62c2-4953-a761-d13d34696007;alias
From: "199"<sip:199#ubuntu-xenial>;tag=a1b0c71d-f89b-4226-a84e-82e7db8b2b21
To: <sips:198#192.168.100.97;rtcweb-breaker=no>
Contact: <sips:asterisk#ubuntu-xenial:5060;transport=ws>
Call-ID: a47911b2-c6d4-4222-961b-f0418a4e00c0
CSeq: 30108 INVITE
Content-Type: application/sdp
Content-Length: 1085
Allow: OPTIONS,SUBSCRIBE,NOTIFY,PUBLISH,INVITE,ACK,BYE,CANCEL,UPDATE,PRACK,REGISTER,MESSAGE,REFER
Supported: 100rel,timer,replaces,norefersub
Session-Expires: 1800;refresher=uac
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 13.17.2
v=0
o=- 780155122 780155122 IN IP4 192.168.49.32
s=Asterisk
c=IN IP4 192.168.49.32
t=0 0
m=audio 15018 UDP/TLS/RTP/SAVPF 0 101
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 AA:94:9A:8F:24:9A:BD:C2:6B:BA:57:4D:E2:D3:1F:1E:B1:F9:87:B1:96:C7:29:93:B8:75:16:D6:73:9D:1E:3E
a=ice-ufrag:3e3de33532c2fcdc32d71b2f086be032
a=ice-pwd:78e4b4b93a861933107a205a10cac6dd
a=candidate:Hc92a8000 1 UDP 2130706431 fe80::14:68ff:fe3e:8447 15018 typ host
a=candidate:H6893915f 1 UDP 2130706431 fe80::a00:27ff:feeb:a9e 15018 typ host
a=candidate:Ha00020f 1 UDP 2130706431 10.0.2.15 15018 typ host
a=candidate:Hc0a83120 1 UDP 2130706431 192.168.49.32 15018 typ host
a=candidate:Hc92a8000 2 UDP 2130706430 fe80::14:68ff:fe3e:8447 15019 typ host
a=candidate:H6893915f 2 UDP 2130706430 fe80::a00:27ff:feeb:a9e 15019 typ host
a=candidate:Ha00020f 2 UDP 2130706430 10.0.2.15 15019 typ host
a=candidate:Hc0a83120 2 UDP 2130706430 192.168.49.32 15019 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
a=rtcp-mux
Is PJSIP supports PJSIP_HEADER for WebSocket? Is there any other way to add custom header to INVOTE for webrtc client?
I use asterisk 13, and siphtml5 web client. Also I check wss traffic with wireshark, decrypt it and still can't find X-DRP header.
In asterisk set header using:
same => n,SIPAddHeader(HEADERNAME: ${SOMEVAR})
You need use a more updated library like jsSip in client. In this case you cant get the server header like this:
phone.on('newRTCSession', function(e){
if (e.originator == 'remote') {
console.log(e.request.headers);
}
});

Resources