secdev / secdev/scapy

PNIOServiceReqPDU Layer doesn't compute length parameters

Open
#3,843 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.6k
Forks
2.2k
Avg merge
1d 4h
Merged PRs (30d)
56

Description

Brief description

The args_max, args_length, max_count and actual_count parameters of layer PNIOServiceReqPDU are not automatically computed when I try to sent a implicite Read Request.

Scapy version

2.5.0

Python version

3.11

Operating system

Windows Version 10.0.19045 Build 19045

Additional environment information

No response

How to reproduce
ReadPacket = scapy.all.Ether() / scapy.all.IP(dst=192.168.1.3) / scapy.all.UDP(dport=49152, sport=59832) / scapy.all.DceRpc4(
            rpc_vers=4, ptype=0, flags1=0x28, flags2=0x00, object=0xdea000006c9711d182710001fff1011e, endian=0, if_id=0xdea000016c9711d1827100a02442df7d, act_id=0x9bf6098164c5452fa410d885d4e300d1, opnum=5,  seqnum=rpc_seqnum
        )/scapy.contrib.pnio_rpc.PNIOServiceReqPDU()/scapy.contrib.pnio_rpc.IODReadReq(
            block_length=60, seqNum=1, slotNumber=0, subslotNumber=1, index=0xAFF1, recordDataLength=4096)
        ReadPacket.show() #ReadPacket.show2() doesn't show anything different
        scapy.all.sendp(ReadPacket, iface=interface)
#replace interface with your interface
Actual result
###[ PNIOServiceReqPDU ]###
              args_max  = None
              args_length= None
              max_count = None
              offset    = 0
              actual_count= None
              \blocks    \
Expected result
###[ PNIOServiceReqPDU ]###
              args_max  = 1392
              args_length= 64
              max_count = 1392
              offset    = 0
              actual_count= 64
              \blocks    \
Related resources

PNIO Bug Report.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the PNIOServiceReqPDU and IODReadReq definitions, then run the supplied Python reproduction with the packet's show output. Trace how the request fields determine args_max, args_length, max_count, and actual_count; done means these values are computed as expected for the example request.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.