Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
VLC_CVE-2021-25801_Analysis — VLC के AVI पार्सर में CVE-2021-25801 का तकनीकी विश्लेषण, जो क्राफ्टेड सब-इंडेक्स चंक्स के माध्यम से आउट-ऑफ-बाउंड्स रीड को प्रदर्शित करता है और एक प्रूफ-ऑफ-कॉन्सेप्ट प्रदान करता है। | Kitploit
उपकरण/GitHubGitHub/dshankle/vlc_cve-2021-25801_analysis
भेद्यता विश्लेषणशोषणफज़िंगबाइनरी विश्लेषण
GitHubdshankle/vlc_cve-2021-25801_analysis

VLC_CVE-2021-25801_Analysis

VLC के AVI पार्सर में CVE-2021-25801 का तकनीकी विश्लेषण, जो क्राफ्टेड सब-इंडेक्स चंक्स के माध्यम से आउट-ऑफ-बाउंड्स रीड को प्रदर्शित करता है और एक प्रूफ-ऑफ-कॉन्सेप्ट प्रदान करता है।

रिपॉजिटरी देखें
4 साल पहलेअभी तक समीक्षित नहीं

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें

CVE-2021-25801 विश्लेषण

यह भेद्यता एक वैध सुपर इंडेक्स चंक द्वारा इंगित सब इंडेक्स चंक को पढ़ने का प्रयास करते समय __Parse_indx को पारित किए जा रहे चंक के प्रकार की पूरी तरह से जांच करने में विफलता से उत्पन्न होती है।

root@kitploit:~
  else if( p_indx->i_indextype == AVI_INDEX_OF_INDEXES ) //यह सुपर इंडेक्स के लिए अपेक्षित मान है
        {
            if ( !p_sys->b_seekable )
                return;
            avi_chunk_t    ck_sub;
            for( unsigned i = 0; i < p_indx->i_entriesinuse; i++ )
            {
                if( vlc_stream_Seek( p_demux->s,
                                     p_indx->idx.super[i].i_offset ) ||
                //जब तक चंक शून्य नहीं है और fourcc 0 नहीं है और फ़ाइल में कम से कम 7 बाइट्स शेष हैं, ChunkRead एक मान लौटाएगा
                    AVI_ChunkRead( p_demux->s, &ck_sub, NULL  ) )
                {
                    break;
                }
                //CVE-2021-25801
                //सुपर इंडेक्स एक ऑफसेट की ओर इंगित करता है जिसमें 13वां बाइट 0x01 पर सेट है
                //लेकिन यह जांच नहीं की जाती है कि यह वास्तव में एक वैध indx फ़ील्ड चंक की ओर इंगित कर रहा है या नहीं
                if( ck_sub.indx.i_indextype == AVI_INDEX_OF_CHUNKS )
                    __Parse_indx( p_demux, &p_index[i_stream], pi_last_offset, &ck_sub.indx );
                AVI_ChunkClean( p_demux->s, &ck_sub );
            }

सब इंडेक्स के चंक का प्रकार AVI_ChunkRead फ़ंक्शन द्वारा निर्धारित किया जाता है।

root@kitploit:~
int  AVI_ChunkRead( stream_t *s, avi_chunk_t *p_chk, avi_chunk_t *p_father )
{
    int i_index;

    if( !p_chk )
    {
        msg_Warn( (vlc_object_t*)s, "cannot read null chunk" );
        return VLC_EGENERIC;
    }

    if( AVI_ChunkReadCommon( s, p_chk, p_father ) )
        return VLC_EGENERIC;

    if( p_chk->common.i_chunk_fourcc == VLC_FOURCC( 0, 0, 0, 0 ) )
    {
        msg_Warn( (vlc_object_t*)s, "found null fourcc chunk (corrupted file?)" );
        return AVI_ZERO_FOURCC;
    }
    p_chk->common.p_father = p_father;
              //यह फ़ंक्शन fourcc मान पढ़ता है और संबंधित ChunkRead फ़ंक्शन के लिए vtable के विरुद्ध जांच करता है
    i_index = AVI_ChunkFunctionFind( p_chk->common.i_chunk_fourcc );
    if( AVI_Chunk_Function[i_index].AVI_ChunkRead_function )
    {
        return AVI_Chunk_Function[i_index].AVI_ChunkRead_function( s, p_chk );
    }
    else if( ( ((char*)&p_chk->common.i_chunk_fourcc)[0] == 'i' &&
               ((char*)&p_chk->common.i_chunk_fourcc)[1] == 'x' ) ||
             ( ((char*)&p_chk->common.i_chunk_fourcc)[2] == 'i' &&
               ((char*)&p_chk->common.i_chunk_fourcc)[3] == 'x' ) )
    {
        p_chk->common.i_chunk_fourcc = AVIFOURCC_indx;
        return AVI_ChunkRead_indx( s, p_chk );
    }

    msg_Warn( (vlc_object_t*)s, "unknown chunk: %4.4s (not loaded)",
            (char*)&p_chk->common.i_chunk_fourcc );
    return AVI_NextChunk( s, p_chk );
}

यदि सुपर इंडेक्स अपेक्षित indx चंक से छोटे प्रकार के एक वैध चंक की ओर इंगित करता है, तो हम __Parse_indx में निम्नलिखित चर निर्दिष्ट होने पर आउट-ऑफ-बाउंड्स रीड उत्पन्न कर सकते हैं।

root@kitploit:~
  for( unsigned i = 0; i < p_indx->i_entriesinuse; i++ )
        {
            index.i_id     = p_indx->i_id;
            index.i_flags  = p_indx->idx.field[i].i_size & 0x80000000 ? 0 : AVIIF_KEYFRAME;
            index.i_pos    = p_indx->i_baseoffset + p_indx->idx.field[i].i_offset - 8;  //<-एक्सेस उल्लंघन यहाँ होता है
            index.i_length = p_indx->idx.field[i].i_size;
            index.i_lengthtotal = index.i_length;

            avi_index_Append( p_index, pi_max_offset, &index );
        }

0x34 बाइट्स आकार के strh fourcc चंक का उपयोग करके मैं उपरोक्त भेद्य कोड तक पहुंचने के लिए सभी पूर्वापेक्षा जांचों को सफलतापूर्वक पार करने में सक्षम था, जिसके परिणामस्वरूप एक्सेस उल्लंघन हुआ।

root@kitploit:~
avi stream debug: <list 'AVI '>
avi stream debug: <list 'hdrl'>
avi stream debug: <list 'strl'>
avi stream warning: chunk LIST does not fit into parent 4060
avi stream debug: </list 'strl'>ffffffff
avi stream warning: chunk LIST does not fit into parent 4060
avi stream debug: </list 'hdrl'>ffffffff
avi stream debug: skipping movi chunk
avi stream debug: no more data at 4128
avi stream debug: </list 'AVI '>ffffffff
avi stream debug: no more data at 4128
avi stream debug: * LIST-root size:4128 pos:0
avi stream debug:     + RIFF-AVI  size:4124 pos:0
avi stream debug:     |   + LIST-hdrl size:4040 pos:12
avi stream debug:     |   |   + avih size:56 pos:24
avi stream debug:     |   |   + LIST-strl size:3964 pos:88
avi stream debug:     |   |   |   + strh size:56 pos:100
avi stream debug:     |   |   |   + strf size:44 pos:164
avi stream debug:     |   |   |   + indx size:3832 pos:216
avi stream debug:     |   + LIST-movi size:64 pos:4056
avi demux debug: AVIH: 1 stream, flags  HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE 
avi demux debug: stream[0] rate:419430400 scale:16777216 samplesize:0
avi demux debug: stream[0] video(XVID) 640x360 0bpp 25.000000fps
main input debug: selecting program id=0
avi demux debug: loading subindex(0x1) 1870082273 entries
(7fc.9d4): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0a77f838 ebx=0029df9f ecx=4f4e4d4c edx=53525150 esi=091f7000 edi=53525150
eip=6f772c43 esp=0a77f750 ebp=0a77f870 iopl=0         nv up ei pl nz ac pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010216
libavi_plugin+0x2c43:
6f772c43 8b7e04          mov     edi,dword ptr [esi+4] ds:002b:091f7004=????????

प्रदान किया गया PoC विंडोज 11 पर, VLC संस्करण 3.0.11 के साथ परीक्षण किया गया था।

टूल डाउनलोड करें